Page 1 of 1

Variables in News module not working as they used to

Posted: Wed Sep 25, 2013 1:20 pm
by JM6891
Hi there,

I normally assign a variable to the news title so I can pass this to the page title. The following usually works:

Code: Select all

{assign var='alt_title' value=$entry->title}
Then in my template I add {$alt_title} within the <title> tag

I'm now using cmsms 1.11.8 and this value isn't being passed through.

If I test a string with:

Code: Select all

{assign var='alt_title' value='test'}{$alt_title}
Then the word 'test' is printed on the page as expected.

However, if I change it back to

Code: Select all

{assign var='alt_title' value=$entry->title}
then nothing is printed on the page.

I know there has been an upgrade to smarty 3 - could this be causing some kind of issue here?

As I say, this has worked fine in previous versions of cmsms, but not working in this one,

thanks in advance

Re: Variables in News module not working as they used to

Posted: Wed Sep 25, 2013 5:56 pm
by Jo Morg
I don't think it's related to Smarty3. It may have to do with either a change in what variables News exposes to Smarty or with the context in which $entry->title is used.
To make sure that either $entry->title is set or holds a value, try to troubleshoot the template (summary I suppose) with {get_template_vars} and then a {$entry|print_r} if $entry appears listed at all.
HTH