[solved] News - all news items have same title tag

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
loosefast
Forum Members
Forum Members
Posts: 36
Joined: Sun Jan 29, 2006 7:06 pm

[solved] News - all news items have same title tag

Post by loosefast »

Hi,

Is there a way to have the page title tag use the news item title tag? In my template, {title} shows "News" for every news item page.

thanks
Last edited by loosefast on Sun Feb 14, 2010 5:41 pm, edited 1 time in total.
reneh
Dev Team Member
Dev Team Member
Posts: 446
Joined: Tue Nov 28, 2006 8:39 pm

Re: News - all news items have same title tag

Post by reneh »

Yes


Try to read this:
http://calguy1000.com/Blogs/4/60/the-we ... dness.html
the "Dynamic tags" are probably that you look for.....
ReneH 8-)
A search will save you hours waiting for an answer! Image
User avatar
loosefast
Forum Members
Forum Members
Posts: 36
Joined: Sun Jan 29, 2006 7:06 pm

Re: News - all news items have same title tag

Post by loosefast »

Thanks for the reply.

I added this to my News detail template:

{assign var='pagetitle' value=$entry->title}

I edited the code in my template to this:
(The example code under "Dynamic tags" threw a smarty error until I changed the end tag to {/if}.)

{if isset($pagetitle)}
{$pagetitle} | {sitename}
{else}
{title} | {sitename}
{/if}

The error stopped, but News items still don't display the correct Title tag.
User avatar
loosefast
Forum Members
Forum Members
Posts: 36
Joined: Sun Jan 29, 2006 7:06 pm

Re: News - all news items have same title tag

Post by loosefast »

In config.php

# setting this parameter to false.
$config['process_whole_template'] = false;

Now it works.

Thanks
Post Reply

Return to “Modules/Add-Ons”