Re: [Phplib-users] url() in templates
Brought to you by:
nhruby,
richardarcher
From: Tarique S. <ta...@sa...> - 2001-08-14 11:28:40
|
On Tue, 14 Aug 2001, Richard Archer wrote: > At 11:38 AM +0200 14/8/01, Guenther Theilen wrote: > You don't want to be executing your templates!! Yep! this is exactly what templates are not supposed to do - execute code. > There are two choices here. The way I'd normally do it is to set up my > template like: > <a href="test.php{sess_url_suffix}">foo</a> IMHO a cleaner way would be have in template <a href="{test_url}">foo</a> Then in your code $test_url = $sess->url(test.php).$sess->padd_query(array("again"=>"yes")) set_var("test_url", $test_url); Need not worry about grabbing things after '?' etc etc. Also it would be cool if we can have some predefined template variables like {sessID}, {selfURL} which will do - well the obvious Not too much of a problem to implement either ... .... Just my 2p Cheers Tarique -- ========================================= B2B Application Providers http://www.sanisoft.com Vortal for Nagpur http://nagpurcity.net ========================================= |