RE: [SMARTY-DEV] feature request

From: Date: Mon, 05 Jan 2004 18:01:42 +0000
Subject: RE: [SMARTY-DEV] feature request
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2031@lists.php.net to get a copy of this message
Indeed, I meant the {get_*}-way, not the {show_*} one! (I really should improve my English to make myself more understandable) Regards, Peter -----Original Message----- From: Monte Ohrt [mailto:monte@ispi.net] Sent: maandag 5 januari 2004 18:59 To: Mark Rogers Cc: 'Smarty Dev' Subject: Re: [SMARTY-DEV] feature request On Mon, 2004-01-05 at 11:29, Mark Rogers wrote: > Putting the module into a custom function moves the presentation > of the module into the code, not in the template, which completely goes > against the code separation principle. It doesn't necessarily move presentation to the code, you can still use templates to present the output of the function. In my case I use a function only for grabbing the content, not displaying it. Example: {get_article_info id=$art_id assign="art_info"} {* art_info now contains my article information *} <b>{$art_info.title}</b><br /> {$art_info.subtitle}<br /> <i>{$art_info.byline}</i> In the case your function must take data and wrap it around some presentation yet you still want to keep the presentation control in a template, you can pass a path to your template to the function: {show_article id=$art_id template="article.tpl"} You certainly want to avoid hard-coding presentation elements in the function unless the function is specifically meant to do so. -- Smarty Development Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.smarty.dev (#2031) next »