Page 1 of 1

eval not eval-ing navigator

Posted: Wed Aug 10, 2016 12:54 am
by DavidJessurun
Hi all,

Having trouble deciding which forum is right, hope I chose wisely.

Anyway, I'm pulling content into a template in navigator and it works, only the tags still show up plaintext, rather than being eval-ed.

I'm using: {cgsimple::get_page_content($node->alias,'',pageContent)}{eval var=$pageContent}

Any ideas?

TIA!

Re: eval not eval-ing navigator

Posted: Wed Aug 10, 2016 5:30 am
by Rolf
Yeah this is valid
See alse http://www.cmscanbesimple.org/blog/mult ... query-tabs
Eval can only have security issues on I.e. front end posting of articles

Grtz Rolf

Re: eval not eval-ing navigator

Posted: Wed Aug 10, 2016 9:14 am
by DavidJessurun
Rolf wrote:Yeah this is valid
See alse http://www.cmscanbesimple.org/blog/mult ... query-tabs
Eval can only have security issues on I.e. front end posting of articles

Grtz Rolf
If I understand you right, you're saying the code is correct. Thing is, it does not work. :)

Re: eval not eval-ing navigator

Posted: Wed Aug 10, 2016 10:57 am
by Rolf
Assign $node->alias to seperate string or put it in between "{. }"
Untested

Re: eval not eval-ing navigator

Posted: Wed Aug 10, 2016 11:11 am
by velden
First double check the content is assigned to the variable and not outputted by the first call

Code: Select all

output by cgsimple:<br>
{cgsimple::get_page_content($node->alias,'',pageContent)}
output by eval:<br>
{eval var=$pageContent}
CGSimpleSmarty help seems ambiguous about it but I don't think get_page_content method has a assign parameter anymore.

Alternative could then be (untested):

Code: Select all

{eval var={cgsimple::get_page_content($node->alias)}}

Re: eval not eval-ing navigator

Posted: Thu Aug 11, 2016 8:59 am
by rotezecke

Re: eval not eval-ing navigator

Posted: Fri Aug 12, 2016 12:53 pm
by DavidJessurun
rotezecke wrote:this rang a bell
http://dev.cmsmadesimple.org/bug/view/10632
That fixed it, thanks!

For others coming in through Google or something, this is the right syntax:

{$foo=cgsimple::get_page_content('about','second')}{eval var=$foo}