Passing news title to page title

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
Chris F
Forum Members
Forum Members
Posts: 31
Joined: Wed Jan 28, 2009 3:33 pm

Passing news title to page title

Post by Chris F »

I'm having some trouble pushing my News article title into my Page title so it shows up in the title bar.

In my news template at the top I have

{assign var='ArticleTitle' value=$entry->title|cms_escape:htmlall scope='global'}

and in the page template where the detail page loads I have in the head tag...

<title>{if isset($articleTitle)}{$articleTitle}{else}{title}{/if} | {sitename}</title>

But when I pull up the detail page, ArticleTitle is undefined. Can anyone tell me what I'm missing?

Thanks!


CMSMS 2.1.6
News 2.50.6
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Passing news title to page title

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm

Re: Passing news title to page title

Post by rotezecke »

Smarty is case sensitive, you assigned "$ArticleTitle" but you test for $articleTitle .
Chris F
Forum Members
Forum Members
Posts: 31
Joined: Wed Jan 28, 2009 3:33 pm

Re: Passing news title to page title

Post by Chris F »

Goodness! Thanks guys! I had a lower case a. I should have known I was overlooking something ridiculously simple.

I'll try to post a more challenging question next time! ::)
Locked

Return to “CMSMS Core”