Attached is H::T::Filters module which implements some common filters.  One of them is 
the TMPL_SET filter which can be used to do what you are asking for.

Hope this helps,
Mathew


----- Original Message ----- 
From: "Thilo Planz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 01, 2004 10:32 AM
Subject: [htmltmpl] setting template parameters from within the template?


> Hello,
> 
> is there a way to set template parameters from within the template?
> 
> I would like to do this because I have pages that include a common 
> header (who doesn't ?)
> 
> <tmpl_include common_header>
> 
> and that header makes a page title.
> 
> <tmpl_var page_title>
> 
> At the moment, I have to set "page_title" in my application code (well, 
> not really, it is factored out into a data file, but still...).
> 
> $tmpl->param(page_title => 'Whatever');
> 
> It would be nice if I could do something like
> 
> <tmpl_param page_title Whatever>
> <tmpl_include common_header>
> 
> or even
> 
> <tmpl_include common_header with-params: ' page_title => Whatever' >
> 
> so that the design people (who edit the templates, but not the code) 
> can set the page title (which is a purely presentational issue most of 
> the time)
> right in the template.
> 
> 
> I am aware that this is probably difficult to implement, so just for 
> the long-term wish-list...
> 
> 
> Thilo
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> Html-template-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/html-template-users
> 

Attachment: Filters.pm
Description: Binary data

Reply via email to