By 2houseplague on
I'm using the Page Title Module, which normally requires a small modification to the theme template to show the desired (over-ridden) title in the head. Here's the code:
if (module_exists('page_title')) {
$vars['head_title'] = page_title_page_get_title();
}
Unfortunately, I'm working on a site that's using the Chameleon Marvin theme, a non-template theme. How do I modify the chameleon.theme file in the appropriate place to call the page title from the module and print that in the head, instead?
I'm looking at this line from the chameleon theme:
$output .= " <title>". ($title ? strip_tags($title) ." | ". variable_get("site_name", "Drupal") : variable_get("site_name", "Drupal") ." | ". variable_get("site_slogan", "")) ."</title>\n";
Comments
The solution was I replaced
The solution was I replaced the above line from the chameleon.theme file with this one:
Proton Cannon
Error when I follow solution above . . .
When I replace the first portion of this:
with:
so that it looks like this:
I get the following error:
Parse error: syntax error, unexpected ':' in /home/spaceadv/public_html/themes/chameleon/chameleon.theme on line 33
Can someone help me with this syntax? That colon is in the same place in both examples. What is it about the change that makes that colon use bad syntax?
Jack
Here's a larger excerpt from my chameleon.theme file from which the above is derived:
Never mind, got it!
You have to replace the whole section with that one line, not just the top line of that section.
Jack