J'ai une vue appelée "video_by_category" avec un chemin de "video/category /%" le% recherche un terme de taxonomie. Un terme peut être "voiture". Je veux créer un modèle de page personnalisé pour cette vue similaire à page.tpl.php. J'ai fait quelques suggestions de thème comme page-video-catégorie, page-video_by_category.tpl.php, page-views-view-video-category.tpl.php, mais rien ne fonctionne. Comment cela peut-il être fait?Fichier modèle Drupal Page pour une vue
Dans mon template.php j'ai ceci:
function theme428_preprocess_page(&$variables) {
if ($variables['node']->type != "") {
if (arg(0)=='node' && arg(2)!='edit') { // not for node edit forms
if(arg(1)!=''){
$arg1='-'.arg(1);
}
//$variables['template_files'][] = "page-node-" . $variables['node']->type.$arg1;
$variables['template_files'][] = "page-node-" . $variables['node']->type;
}
}
//print_r($variables['template_files']);
$variables['scripts'] = drupal_get_js();
return $variables;
}
grâce