// in template.php
function _phptemplate_variables($hook, $vars) {
switch ($hook) {
case 'page':
foreach (views_get_all_urls() as $key => $value) {
if($_GET['q'] == $value) {
$vars['views_class'] = yourtheme_id_safe($value);
}
}
break;
}
return $vars;
}
// borrowed this from zen :)
function yourtheme_id_safe($string) {
// if the first character is numeric, add 'n' in front
$string = 'n'. $string;
}
}
// in page.tpl.php add this to your body class (or anywhere)
<div class="page<?php print ($views_class) ? ' page'- . $views_class : ''; ?>">