Re: Smarty feature proposal: context aware template tags

From: Date: Wed, 28 Nov 2001 11:29:56 +0000
Subject: Re: Smarty feature proposal: context aware template tags
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2071@lists.php.net to get a copy of this message
Hello, Anders Janson wrote:
the tag. The section tag perhaps being the best example, but I still wonder why you would need to know this? Could you give a real-life example of a situation where this would be useful ?
We have a comments system where you can put user comments on a page (like the online PHP manual) for example by putting a {comments} tag in a template. This renders a comment.tpl for each comment, which in turn can contain a {comments} tag to render the subcomments, and so on. If I have this stack, I can use this information to determine which subcomments to render, how much to indent the comments etc. (Our current solution contains some static and global vars to accomplish the same, but that's a bit dirty) Greetings, Ivo -- Ivo Jansch <ivo@ibuildings.nl> ibuildings.nl BV - information technology http://www.ibuildings.nl

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