migration to 1.4.0
| From: | Holger Bahr | Date: | Mon, 07 May 2001 20:57:50 +0000 |
| Subject: | migration to 1.4.0 | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-692@lists.php.net to get a copy of this message | ||
I am coming from 1.3.2 and have trouble with 1.4.0 now
I use an array like this:
$elements = array("table" => array("001.tpl", "002.tpl"),
"name" => array("Welcome", "Sign up")
);
wich represents 2 (or anyamount) Tables of an HTML Page.
"Table" is the content and "Name" is the title of the Table.
The "name" part of each table looks quite the same all the time
so i separated the HTML in a file called "table_header.tpl"
In 1.3.2, i could loop through $elements
(i use the loop for multiple file-includes):
{section name=content loop=$elements}
{include file=$elements[content]}
{/section}
and the loop opens 001.tpl and then 002.tpl.
in each of those template files, i had another include statement
(directly on top for the part wich is always the same on every
table/template):
{include file="table_header.tpl"}
and in that table header, in that template, i drop the name of the table.
The old syntax was like:
{$elements/name}
Now my Question because {$elements[name]} does not work...
In my Loop ...
{section name=content loop=$elements}
{include file=$elements[content]}
{/section}
... how can i access the content of "name" in an included file ?
$elements = array("table" => array("001.tpl", "002.tpl"),
"name" => array("Welcome", "Sign up")
);
As i said, on 1.3.2 it works fine.
Holger