[htmltmpl] setting template parameters from within the template?
Brought to you by:
samtregar
From: Thilo P. <thi...@we...> - 2004-10-01 00:26:38
|
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 |