Variables in News module not working as they used to

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
JM6891
Forum Members
Forum Members
Posts: 150
Joined: Thu Mar 18, 2010 2:35 pm

Variables in News module not working as they used to

Post 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
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

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

Post 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
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Post Reply

Return to “Modules/Add-Ons”