Re: [SMARTY] Is it possible to do this?
| From: | Monte Ohrt | Date: | Tue, 02 Nov 2004 14:16:34 +0000 |
| Subject: | Re: [SMARTY] Is it possible to do this? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-11943@lists.php.net to get a copy of this message | ||
You can' t do that.
One way to work around the repetition is to put the popup function in a template of its own like this:
popup.tpl
-------------
{popup fgcolor=$fgcolor|default:"FFFFC5" capcolor=$capcolor|default:"D4D0C8" ...}
Then to put the popup in your template, include it:
{include file="popup.tpl"}
If you want to change any of the default parameters, supply them:
{include file="popup.tpl" bgcolor="EEEEEE" capcolor="A40000" ...}
Monte
pt2002 wrote:
Popup function, another try...
Hello
I am using popup plugin and it's everything ok.
The question is:
The param list is long and I would like to know I can use a var to assign values
I try this in template
{assign var="pop" value="fgcolor='FFFFC5' bgcolor='0' capcolor='D4D0C8' shadow=1 shadowy=7 shadowx=7 shadowcolor='F0F0F0' shadowopacity=60 captionfont='arial.ttf' captionsize=4 textsize=1"}
Can I write
{popup $pop text='blah blah'} just to avoid type all params list. ?
I also tried $pop but I can't get this to work.
It's a lot of work to repeat every {popup .... } for every link, image, etc I need to show a popup.
Greetings