How do I add 2 for one view display override?
This is the code I have that works:
function yourthemename_preprocess_html(&$vars) {
if (arg(0) == 'qrule') {
$vars['theme_hook_suggestions'][] = 'html__qrule';
}
}
HTML template page called: html--qrule.tpl.php
This works fine! (thanks @Ionut.A)
But I also want to override the page.tpl.php too with page--qrule.tpl.php but when I add this:
function mythemename_preprocess_html(&$vars) {
if (arg(0) == 'qrule') {
$vars['theme_hook_suggestions'][] = 'html__qrule';
$vars['theme_hook_suggestions'][] = 'page__qrule';
}
}
PAGE template page called: page--qrule.tpl.php
I get this error:
Fatal error: Only variables can be passed by reference in /var/www/vhosts/xxx/public_html/sites/all/themes/themename/page--qrule.tpl.php on line 1
Can anyone see what i’m doing wrong here?
Thanks
C
If you’re adding a theme hook suggestion for the page.tpl.php file you’ll need to to it in
hook_preprocess_page():