Cycle and Config vars
| From: | Eskil Kvalnes | Date: | Tue, 29 Apr 2003 13:04:22 +0000 |
| Subject: | Cycle and Config vars | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-9417@lists.php.net to get a copy of this message | ||
Hey,
I'm trying to {cycle} two config variables and whatever I try to do, it
doesn't work.
I've searched the mailinglist for answers and none of them work.
In my config file (conf.colors.php) I have:
color1 = #A1A7B2
color2 = #798291
colorCycle = {#color1#},{#color2#}
And in my template file (foo.tpl.htm) I have:
{eval var="#colorCycle#" assign=colorCycle}
bgcolor="{cycle values=$colorCycle}"
{foreach from=smth item=smth}
bgcolor="{cycle}"
{/foreach}
Now this works fine if I just replace $colorCycle with #A1A7B2, #798291.
But now all I get is #colorCycle# printed as colors...
I've tried every possible solution I could think of and nothing works.
Even tried {eval var=#colorCycle# assign="colorCycle"} (notice the quotes
are gone as this was stated as a solution by Monte Ohrt. That produces an
error. Warning eval missing var parameter etc.
--
Eskil Kvalnes <eskil@uten.net>
http://www.hypothetic.net/