CGContentUtils and CMSMS 2.1.5

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
musicscore
Power Poster
Power Poster
Posts: 444
Joined: Wed Jan 25, 2006 11:53 am
Location: Netherlands

CGContentUtils and CMSMS 2.1.5

Post 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.
pWorker
Forum Members
Forum Members
Posts: 48
Joined: Wed Aug 31, 2016 1:30 pm

Re: CGContentUtils and CMSMS 2.1.5

Post 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
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3483
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: CGContentUtils and CMSMS 2.1.5

Post 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.
musicscore
Power Poster
Power Poster
Posts: 444
Joined: Wed Jan 25, 2006 11:53 am
Location: Netherlands

Re: CGContentUtils and CMSMS 2.1.5

Post by musicscore »

omg. velden,

Your the best. This workes.
Thanx.

:)
Post Reply

Return to “Modules/Add-Ons”