Page 1 of 1
Cataloger module and smarty tags not working
Posted: Fri Dec 21, 2007 4:54 am
by peedub
Currently smarty tags don't work with the Cataloger module. For example, "{global_content name='myexample'}" simply shows up as "{global_content name='myexample'}" on the front-end, instead of displaying the contents of the global_content.
Does anyone know a work-around to get smarty tags to work with Cataloger?
Using latest* Cataloger - 0.5.5 and CMSMS 1.2
* EDIT: Just noticed that Cataloger 0.5.6 was released on the 10th of Dec. Still, now new functionality for supporting smarty tags was in the changelog, so I guess the problem still persists.
Thanks in advance.
Re: Cataloger module and smarty tags not working
Posted: Tue Mar 04, 2008 2:59 am
by peedub
*Desperate bump*
This has been an ongoing problem for me and has not been addressed by anyone on the forums, IRC or even Smarty forums.
One guy was close to telling me the problem and solution, however he was reluctant to as he's not a fan of CMSMS. Pretty helpful, huh?
As you can imagine, after months of putting up with this problem, things are quite frustrating.
I am now using the latest CMSMS 1.2.3 and Catalog's latest 0.6.2.
The problem is that Smarty tags such as "{contact_form email="
yourname@yourdomain.com"}" don't get processed. In this case, that Smarty tag is meant to display an e-mail contact form, but it just displays the text, "{contact_form email="
yourname@yourdomain.com"}".
Here's the debugging code from putting {debug} in the Cataloger's template which I am using:
Code: Select all
Smarty Debug Console
included templates & config files (load time in seconds)
no templates included
assigned template variables
{$SCRIPT_NAME} "/cmsmadesimple/index.php"
{$active} true
{$alias} "item1"
{$app_name} "CMS"
{$attrlist} Array (1)
0 => Array (2)
name => "Item Notes"
key => "{$itemnotes}"
{$content_id} "59"
{$count} 8
{$encoding} "UTF-8"
{$endform} "</form><i>\n</i>"
{$friendly_position} "8.1"
{$gCms}
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 247783 bytes) in C:\xampplite\htdocs\cmsmadesimple\lib\smarty\plugins\modifier.debug_print_var.php on line 47
Hope that helps.
Re: Cataloger module and smarty tags not working
Posted: Tue Mar 04, 2008 3:03 am
by JeremyBASS
Hey there... down at the bottom it says that you have
Allowed memory size of 16777216 bytes exhausted (tried to allocate 247783 bytes)
so that'd be the frist thing to try... also do you have ERRORmailer installed? i got tons of errors like that untill i uninstalled it... but i also got 500 errors too... just a thought... hope that helps
Re: Cataloger module and smarty tags not working
Posted: Wed Mar 05, 2008 7:08 am
by peedub
JeremyBASS wrote:
Hey there... down at the bottom it says that you have
Allowed memory size of 16777216 bytes exhausted (tried to allocate 247783 bytes)
so that'd be the frist thing to try... also do you have ERRORmailer installed? i got tons of errors like that untill i uninstalled it... but i also got 500 errors too... just a thought... hope that helps
Is ERRORmailer a module for CMSMS?
If so, I don't have it.
Searching my CMSMS install shows that I have nothing that goes by the name "ERRORmailer".
As for the fatal error, I have no idea where to begin with that...
Anyone?
Plus, surely someone must have noticed before the Smarty tags don't work with Cataloger, as well as Albums module when I last checked.
Re: Cataloger module and smarty tags not working
Posted: Sun Mar 09, 2008 2:30 pm
by alby
peedub wrote:
*Desperate bump*
Try with:
{capture assign='mytag'}{smarty tag}{/capture}
{if !empty($mytag)}{eval var=$mytag}{/if}
peedub wrote:
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 247783 bytes) in C:\xampplite\htdocs\cmsmadesimple\lib\smarty\plugins\modifier.debug_print_var.php on line 47
This is a php memory_limit problem. Search in forum for php code
Alby
Re: Cataloger module and smarty tags not working
Posted: Fri Mar 14, 2008 5:14 am
by khadland
I am having the same problem. It simply treats any smarty tags in a cataloger item as plain text. I have a custom tag which calls and resizes images on the fly to be displayed in my content. I need to use this tag in catalog items.
Could it be because the catalog item is called using a smarty tag? So effectively I am trying to call a smarty tag within a smarty tag.
Any help would be appreciated greatly!
Re: Cataloger module and smarty tags not working
Posted: Sun Mar 16, 2008 9:04 pm
by Mantlet
Hey,
The help file states the following:
Smarty tags in Attributes
Sometimes, you'll want the descriptions of your items to include smarty tags (e.g., cms_selflink). To make that work, you'll need to update your template. For the attributes where you want smarty tags to be active, you'll need to nest the smarty evaluations in your template. For example:
{eval var=$attrlist[at].key}
becomes:
{eval var=$entry->input assign=thisAttr}{eval var=$thisAttr}
Ugly? Yup. But it works.
Have you reworked your template to this format? I think that makes it so that the contents of a text field can contain smarty tags. Never tried it though, but it seems a reasonable explanation.
Re: Cataloger module and smarty tags not working
Posted: Mon Mar 17, 2008 2:14 am
by khadland
Thanks for that, it gave me somewhere to look. I edited the category item template where it called the attribute that contained smarty tags.
From
{$info}
To
{eval var=$info}
This worked for me.