Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty do not find 'cycle' tag, how come?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
loop_until
Smarty n00b


Joined: 22 Jul 2003
Posts: 3

PostPosted: Tue Jul 22, 2003 3:42 pm    Post subject: Smarty do not find 'cycle' tag, how come? Reply with quote

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! Smile
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Tue Jul 22, 2003 4:44 pm    Post subject: Reply with quote

does {assign var=foo value=bar} work?

if yes: strange. Sad
if not: it's your plugins_dir
Back to top
View user's profile Send private message Send e-mail Visit poster's website
loop_until
Smarty n00b


Joined: 22 Jul 2003
Posts: 3

PostPosted: Tue Jul 22, 2003 7:57 pm    Post subject: Reply with quote

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! Very Happy
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Tue Jul 22, 2003 8:31 pm    Post subject: Reply with quote

http://smarty.php.net/manual/en/variable.plugins.dir.php
Back to top
View user's profile Send private message
loop_until
Smarty n00b


Joined: 22 Jul 2003
Posts: 3

PostPosted: Tue Jul 22, 2003 9:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP