Re: [SMARTY] Combining variables inside the template

From: Date: Fri, 14 Mar 2003 14:27:19 +0000
Subject: Re: [SMARTY] Combining variables inside the template
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8653@lists.php.net to get a copy of this message
Actually, just "$templatename.tpl" will work. You only need backticks if you want non-word characters to be part of the varname. Monte On Fri, 2003-03-14 at 03:52, messju mohr wrote: > On Fri, Mar 14, 2003 at 10:37:19AM +0100, w.kutting@gmx.de wrote: > > Hi, normaly i include a template inside smarty with {include > > file="mytemplate.tpl"}or in this case with {include file=$templatename} > > > > But how do i get it to work when i got $templatename='mytemplate', > > without the ending .tpl > > i tried to to combine these with {include file=$templatename".tpl"} > > but that doesn't work. Is this possible and how? > > {include file="$templatename.tpl"} > but you need Smarty-2.5.0-RC1 for that. > > have fun > messju -- Monte Ohrt <monte@ispi.net>

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