themes - Drupal template overwrite -


one template output tpl.php template file in hook_theme (eg:book-navigation.tpl.php). use preprocess function overwrite in theme file template.php? if can, give me example of how it?

add code template.php:

function phptemplate_preprocess_book_navigation(&$vars) {   if (writehere_your_condition_when_you_wantto_change_template) {     $vars['template_files'][]  = 'book-navigation-spec';   } } 

copy book-navigation.tpl.php theme folder.
create book-navigation-spec.tpl.php (take source first file), , write changes.
clear cache.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -