Re: [SMARTY] {include} problem
| From: | philippe dot morange at ca-indosuez dot com | Date: | Tue, 11 Mar 2003 15:59:49 +0000 |
| Subject: | Re: [SMARTY] {include} problem | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-8555@lists.php.net to get a copy of this message | ||
> > So, how do I do this?
> >
> > {include file="$template/$page.tpl"}
> >
> > It is very important to my application to be able to do such a thing..
> >
> > Steve
> it is fixed in CVS.
Well what if I need to use an associative array?
I have this in my PHP script:
$general['path'] = "modules.php?name=Proto";
$general['link_view_all'] = "&action=view&mode=all";
$smarty->assign('general', $general);
I need to get this:
{include file="menu_elt.tpl"
link="modules.php?name=Proto&action=view&mode=all&val=true"}
So what do I have to write in my template? None of what I tried worked :-(
I'm really confused, as I tried all possible ways with quotes, back-quotes, single-quotes, no
quotes, ...
none of the following works:
{include file="menu_elt.tpl"
link=$general.path$general.link_view_all."&val=true"}
{include file="menu_elt.tpl"
link="$general.path"."$general.link_view_all"."&val=true"}
...
> On Wed, 2003-02-19 at 23:08, Steve wrote:
>
> -----Original Message-----
> From: Monte Ohrt [mailto:monte@ispi.net]
> Sent: Tuesday, February 18, 2003 8:11 AM
> To: Ferdinand Beyer
> Cc: Smarty General
> Subject: Re: [SMARTY] {include} problem
>
>
> Ah, now that full variable syntax is supported within quoted text it
> will do that. Hmm, a good thing or not?
>
>
> On Tue, 2003-02-18 at 09:16, Ferdinand Beyer wrote:
> > On 17 Feb 2003 at 23:02, Monte Ohrt wrote:
> >
> > > That happened to work, variable catenation has never been supported. Do
> > > this instead:
> > >
> > > "$template/$page.tpl"
> >
> > This won't work since "$page.tpl" assumes an associative array:
> > $this->_tpl_vars['page']['tpl']... :-)
> >
> > --
> > Ferdinand Beyer
> > <fbeyer@clickhand.de>
> --
> Monte Ohrt <monte@ispi.net>
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Monte Ohrt <monte@ispi.net>