Re: [SMARTY] reserved brackets

From: Date: Mon, 06 Jan 2003 17:15:05 +0000
Subject: Re: [SMARTY] reserved brackets
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7037@lists.php.net to get a copy of this message
ideas: 1) put your data in variables, then do: {$myvar|replace:$search:$replace} 2) don't do this in the template, use a pre or post filter instead 3) do this in the application before hand # 2 or 3 look best to me, keep the templates as simple as possible. Monte On Mon, 2003-01-06 at 11:07, Rasmus Schultz wrote: > I need to do something like this in a template: > > {$myvar|replace:'something':'<DIV STYLE="{font-size: > 8px}">something</DIV>'} > > This won't work, because I'm using Smarty's reserved brackets > in the expression - but these are necessary also when writing > stylesheets and stuff ... and in the case of needing to use > the brackets inside an expression, you can't use {literal} > > Any ideas?? > -- Monte Ohrt <monte@ispi.net>

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