Why do dynamic titles work with the News module but not Blog in 1.5.2?
Posted: Mon Feb 23, 2009 1:04 pm
I have an interesting situation where I can get dynamic titles to generate on a "per news item" basis in the News module but not with the Blogs module.
I am utilising a code variation from Calguy which includes placing this code in the "Blog template" tab of the Blogs module:
And this code in the head of the page template from where the {Blogs} content is being called:
And finally, this code just following the templates opening tag:
What happens is this: The title is generated for the first post of the whole blog, but when viewing any other categories or posts, the default blog page title is displayed. This seems to work fine for News but not blogs...
I am utilising a code variation from Calguy which includes placing this code in the "Blog template" tab of the Blogs module:
Code: Select all
{assign var='pagetitle' value=$entry->title}
Code: Select all
<title>{$the_pagetitle}</title>
Code: Select all
{content assign='mycontent'} {*generates detail view titles*}
{* allow adjusting the page title, using a default *}
{if isset($pagetitle)}
{capture assign='the_pagetitle'}{$pagetitle} | {sitename}{/capture}
{else}
{capture assign='the_pagetitle'}{title} | {sitename}{/capture}
{/if}