|
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 |
fidofox Smarty n00b
Joined: 09 Mar 2007 Posts: 2
|
Posted: Fri Mar 09, 2007 1:55 pm Post subject: limitation on plugin naming ? |
|
|
i try to name a plugin by its name and an index within a section:
{section name=idx loop=$buffer}
{html_options name="myname[$smarty.section.idx.index]" ...}
{/section}
Error Message:
"$smarty. is an unknown reference"
|
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Sat Mar 10, 2007 3:36 am Post subject: |
|
|
I can't understand exactly what you are trying to achieve with that. Can you give a better explanation of your goal? |
|
Back to top |
|
TGKnIght Smarty Junkie
Joined: 07 Sep 2005 Posts: 580 Location: Philadelphia, PA
|
|
Back to top |
|
fidofox Smarty n00b
Joined: 09 Mar 2007 Posts: 2
|
Posted: Tue Mar 13, 2007 7:48 pm Post subject: thank's |
|
|
hello TGKnIght
thanks for the hint.
solution
{section name=idx loop=$buffer}
{html_options name=myname[`$smarty.section.idx.index`] options=$names ...}
{section}
the result values of the select elements are returned as an array named myname[0], myname[1] ...
|
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Tue Mar 13, 2007 10:56 pm Post subject: |
|
|
I think you mean:
Code: | {html_options name="myname[`$smarty.section.idx.index`]" options=$names ...}
|
|
|
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
|