Re: New custom function
| From: | Andreas Kossmeier | Date: | Sat, 17 Nov 2001 18:14:29 +0000 |
| Subject: | Re: New custom function | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1936@lists.php.net to get a copy of this message | ||
hi,
Peter Bowyer wrote:
> I've written a wrapper for the PEAR Table.php class to be used as a
> Smarty function. The code and a basic tutorial can be found at
> <http://www.mapledesign.co.uk/coding/smarty_table.php>
how can you use this in real-life and preserve a seperation of
functionality and layout? you can't build a table with more complex
content like e.g. a basic link or a more complex example under
http://www.bergfex.at/soelden/bilder/ or
http://www.bergfex.at/tirol/
maybe we should think about custom tags/functions that also can have an
end delimiter. the table function would be a very useful example for
that. it's more or less the same as a 'section' but with additional
features:
{table name=table loop=$data cols=3 table_attr="width=100%"}
<a href="{$data[table].href}">{$data[table].label}</a><br>
{$data[table].comment}
{/table}
that's how i would like to use a table tag/function. but those kind of
tags also need a special compiler function.
any thoughts?
andreas
--
andreas kossmeier
bergfex.at - http://www.bergfex.at