eval not eval-ing navigator

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
DavidJessurun

eval not eval-ing navigator

Post 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!
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: eval not eval-ing navigator

Post 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
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
DavidJessurun

Re: eval not eval-ing navigator

Post 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. :)
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: eval not eval-ing navigator

Post by Rolf »

Assign $node->alias to seperate string or put it in between "{. }"
Untested
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: eval not eval-ing navigator

Post 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)}}
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm

Re: eval not eval-ing navigator

Post by rotezecke »

DavidJessurun

Re: eval not eval-ing navigator

Post 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}
Locked

Return to “Modules/Add-Ons”