Page 1 of 1

Passing news title to page title

Posted: Tue Feb 28, 2017 10:55 pm
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

Re: Passing news title to page title

Posted: Tue Feb 28, 2017 11:41 pm
by Rolf

Re: Passing news title to page title

Posted: Wed Mar 01, 2017 9:46 am
by rotezecke
Smarty is case sensitive, you assigned "$ArticleTitle" but you test for $articleTitle .

Re: Passing news title to page title

Posted: Wed Mar 01, 2017 5:22 pm
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! ::)