Reputation: 115
In my website I use different templates for each content type. I also use the metadata module.
When I display a node inside the page.tpl.php the $head_title variable is correct and takes the title of the metadata title.
The problem is that when I display a node that is being displayed through another template, the $head_title variable takes the default value.
The way that i chose from which template the node will be displayed is
if (isset($variables['node']->type)) {
// If the node type is "blog" the template suggestion will be "page--blog.tpl.php".
$variables['theme_hook_suggestions'][] = 'page__'. str_replace('_', '--', $variables['node']->type );
}
The $variables['theme_hook_suggestions'] initially contains the array below
page__node
page__node__%
page__node__253
Could anyone help me?
Upvotes: 0
Views: 844
Reputation: 115
The problem was mine. I hadn't implement this render($page['content']['metatags'])
to my template.
Upvotes: 1