|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
loop_until Smarty n00b
Joined: 22 Jul 2003 Posts: 3
|
Posted: Tue Jul 22, 2003 3:42 pm Post subject: Smarty do not find 'cycle' tag, how come? |
|
|
I use the {cycle} function in the following code:
Code: |
<table>
{section name="item_idx" loop=$items}
{cycle values="color1,color2" assign="row_color"}
<tr class="{$row_color}">
<td>{$items[item_idx].locPartID}</td>
</tr>
{/section}
</table>
|
Which gives me:
Code: |
Fatal error: Smarty error: [in catalog.tpl line 7]: [plugin] unknown tag - 'cycle' (Smarty.class.php, line 2549) in /var/www/html/libs/Smarty.class.php on line 2658
|
Everything works fine until I add the {cycle} line. It must be something I don't do right but I can't find what. The 'function.cycle.php' is in my plugin directory, no problem there and I've tried other modifiers and they work.
Any ideas? Thanks for your help! |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Tue Jul 22, 2003 4:44 pm Post subject: |
|
|
does {assign var=foo value=bar} work?
if yes: strange.
if not: it's your plugins_dir |
|
Back to top |
|
loop_until Smarty n00b
Joined: 22 Jul 2003 Posts: 3
|
Posted: Tue Jul 22, 2003 7:57 pm Post subject: |
|
|
Ok, {assign var=foo value=bar} does not work, so if I understand I didn't configure my plugin directory correctly?
How do I make sure it is?
Thanks for your help by the way! |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
|
Back to top |
|
loop_until Smarty n00b
Joined: 22 Jul 2003 Posts: 3
|
Posted: Tue Jul 22, 2003 9:29 pm Post subject: |
|
|
Ok, I've got my answer, for whatever reason, the plugins_dir (in Smarty.class.php) was pointing to a relative path ('plugins') and it seems it was not enought so I've set the absolute path to the plugins directory and it works.
Thanks for the tip. Have a nice day! |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|