Page 1 of 1

(SOLVED) Smarty plugin not being seen

Posted: Sun Oct 19, 2014 8:02 am
by Andrew Prior
I have upgraded from Bartolome to San Christobel.

I have a reverse menu template which has these lines

Code: Select all

{* foreach from=$nodelist item=node *}
{foreach from=$nodelist|@reverse_array item=node}
The first line is the original simple template line, and my modification is to refer to the file modifier.reverse_array.php in the libs/smarty/plugins directory.

This came from a post by Nullig many moons ago.

Code: Select all

 http://forum.cmsmadesimple.org/viewtopic.php?t=22370
I now get the following error

Code: Select all

 Syntax error in template "module_db_tpl:MenuManager;simple_reverse"  on line 12 "{foreach from=$nodelist|@reverse_array item=node}" unknown modifier "reverse_array"


The file is definitely in the same place, so I am guessing there is some smarty 3 issue happening here. How should I reference the reverse_array modifier?

(If I use the original template all is fine, but of course my reverse menus don't happen.)

Re: Smarty plugin not being seen

Posted: Sun Oct 19, 2014 9:06 am
by Jo Morg
Andrew Prior wrote:The file is definitely in the same place, so I am guessing there is some smarty 3 issue happening here.
Yes, the Smarty plugins folder was moved, for some reason, to lib\smarty\libs\plugins.
You'll have to move the file there. Alternatively you can move it to the CMSMS own plugins folder: it should work iirc, and will avoid further problems with Smarty changing its folder structure again.
HTH

Re: Smarty plugin not being seen

Posted: Sun Oct 19, 2014 10:06 am
by Andrew Prior
Awesome Jo. The plugins folder for CMsMadeSimple works. Thankyou