Page 1 of 1

CGContentUtils and CMSMS 2.1.5

Posted: Wed Dec 07, 2016 10:11 am
by musicscore
II want to convert a website from 1.12.2 tot 2.1.5.
On the website I use the following tag :

Code: Select all

 {cgsimple::get_page_content("{$child.alias}",'','foo')}{eval var=$foo}
This workes fine on the 1.12.2 website and content and tags ({news},{gallery}) from the page $child.alias shows up on the master page.

But on cmsms 2.1.5 only the tekst shows up and the tags {news} and {gallery} showsup as {news} and as {gallery}. The tags are not replaced by smarty so the news is not shown and the gallery pictures are not show.

Is there something I have to change in the code to make this work under cmsms 2.1.5.

Please help.

Re: CGContentUtils and CMSMS 2.1.5

Posted: Thu Dec 08, 2016 7:58 pm
by pWorker
Hi,

i had a similar problem. You have to load it via {global_content name='YOURNAME'}. Just make a new template with name "YOURNAME" insert your smarty and link it to your design in the design manager.

That worked for me (also if you want include font awesome icons etc.)

MfG

Re: CGContentUtils and CMSMS 2.1.5

Posted: Sat Dec 10, 2016 11:32 am
by velden
IIRC the assign parameter (the third) is not available anymore (read the help of the CGSimpleSmarty module to verify.

Try (untested):

Code: Select all

{eval var={cgsimple::get_page_content($child.alias)}}
But on cmsms 2.1.5 only the tekst shows up and the tags {news} and {gallery} showsup as {news} and as {gallery}. The tags are not replaced by smarty so the news is not shown and the gallery pictures are not show.
If the plugin doesn't support assign anymore it will print/display/output the result directly. The call to {eval ...} will output nothing as the $foo variable is not defined (because no assignment).

BTW:
{cgsimple::get_page_content("{$child.alias}",'','foo')}
looks very overdone to me. Don't think that's needed. It adds a some unnecessary evaluation for php.

Re: CGContentUtils and CMSMS 2.1.5

Posted: Sat Dec 10, 2016 1:27 pm
by musicscore
omg. velden,

Your the best. This workes.
Thanx.

:)