Re: using variable modifiers with {include} or {assign} tag?

From: Date: Sun, 10 Mar 2002 18:58:25 +0000
Subject: Re: using variable modifiers with {include} or {assign} tag?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3006@lists.php.net to get a copy of this message
You cannot nest Smarty delimiter tags. Just do what you did in your last example, but omit the nested tags. {assign var="title" value=$date|date_format:"%A, %B %e, %Y"} Michael Yoon wrote: > Hi, > > I have a header template that's included by my main template, which, in > turn, passes in the page title, e.g.: > > {include file="header.tpl" title="Page Title"} > > For one of my pages, I want the page title to contain a variable > formatted by the date_format modifier, something like: > > {include file="header.tpl" > title={$date|date_format:"%A, %B %e, %Y"}} > > or: > > {assign var="title" value={$date|date_format:"%A, %B %e, %Y"}} > {include file="header.tpl" title=$title} > > Neither of the above code snippets work, but hopefully you get the idea. > > Any suggestions as to how to accomplish this? > > Thanks, > Michael > > --- > You are currently subscribed to smarty as: monte@ispi.net > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/

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