RE: [SMARTY] vars from templates structure
| From: | Monte Ohrt | Date: | Fri, 22 Nov 2002 14:22:02 +0000 |
| Subject: | RE: [SMARTY] vars from templates structure | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6507@lists.php.net to get a copy of this message | ||
Interesting. In all my experience, it is the programmer that sets up the
variables for the template in accordance to the page content
requirements, and the web designer just needs to know what variables are
available. Variables that have to do with presentation should NOT come
from the application, you just lost your separation. They should be in
the template, or come out of config files.
On Fri, 2002-11-22 at 02:46, Juri Smarschevski wrote:
> > -----Original Message-----
> > From: Monte Ohrt [mailto:monte@ispi.net]
> > Sent: Thursday, November 21, 2002 6:46 PM
> > To: Juri Smarschevski
> > Cc: smarty-general@lists.php.net
> > Subject: Re: [SMARTY] vars from templates structure
> >
> >
> > I'm not sure why you'd want to do that, explain why?
> Assume templates (and tpl. vars) are written by a web-designer,
> the content has to be done by a content-manager. To be able to work
> around content, the content-man needs to know all variables which
> occur in the template-structure.
>
> There is two ways to realize this
>
> 1. parse (and store) all temlates vars(recursive)
> if a new template was created
>
> 2. parse (and store) all tempaltes vars(recursive)
> if a template has to be edited by a content-manager.
>
> Certainly it's possible to determine for each template templates
> variables (and recursive for all child templates ) but I hoped that
> realized solutions or functions are already available ;-/.
>
> I think this problem appears always if content has to be
> linked to templates dynamically - that means only a "root" template
> is known, template structure and therefore tpl. vars are not known
> in advance automatically and have to be determine on the step of
> merge between content and template.
>
> thx and regards,
> juri
>
--
Monte Ohrt <monte@ispi.net>