Created
May 3, 2015 04:58
-
-
Save henrytran9x/ae0a6a7cf519bcbfe2b3 to your computer and use it in GitHub Desktop.
theme_hook_suggestions for taxonomy page Drupal 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mytheme_preprocess_page(&$variables) { | |
if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) { | |
//kiểm tra + thêm điều kiện khi mình muốn load suggestion cho term hoặc vocalbulary nào | |
$variables['theme_hook_suggestions'][] = 'page__taxonomy_term'; | |
} | |
} | |
// Vào thư mục 'templates' tạo file page--taxnomy_term.tpl.php ..overwrite page |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment