Re: [SMARTY] Smarty plugin / modifier

From: Date: Thu, 02 Jun 2005 13:29:32 +0000
Subject: Re: [SMARTY] Smarty plugin / modifier
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12654@lists.php.net to get a copy of this message
You can make a modifier to do that, but the parameter syntax will need to follow the rules, something like: {p} {p h=10 w=5} You could also write a prefilter that will change this: {p:10:5} to this: {p h=10 w=5} Then you could get the brevity you are after. As for writing the modifier, there are instructions and examples in the documentation. Feel free to post here or on the forum if you have trouble. Monte Matija Rijavec @ domenca.si wrote:
Hi all. In my templates, i use a lot of <img src="pixel.gif" height="1" wifth="1"> ...... How can i make modifier / plugin for this ... like : {p} .... ordinary pixel.gif wiht widtht=1 and height=1 -- default values {p:10:5} .... pixel.gif with width=10 and height=5 ... sorry if this isnt maillist for plugins/... Greetz.


« previous php.smarty.general (#12654) next »