Re: [htmltmpl] setting template parameters from within the template?
Brought to you by:
samtregar
|
From: Mathew R. <mat...@re...> - 2004-10-01 00:39:10
|
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 -----=20 From: "Thilo Planz" <thi...@we...> To: <htm...@li...> Sent: Friday, October 01, 2004 10:32 AM Subject: [htmltmpl] setting template parameters from within the = template? > Hello, >=20 > is there a way to set template parameters from within the template? >=20 > I would like to do this because I have pages that include a common=20 > header (who doesn't ?) >=20 > <tmpl_include common_header> >=20 > and that header makes a page title. >=20 > <tmpl_var page_title> >=20 > At the moment, I have to set "page_title" in my application code = (well,=20 > not really, it is factored out into a data file, but still...). >=20 > $tmpl->param(page_title =3D> 'Whatever'); >=20 > It would be nice if I could do something like >=20 > <tmpl_param page_title Whatever> > <tmpl_include common_header> >=20 > or even >=20 > <tmpl_include common_header with-params: ' page_title =3D> Whatever' > >=20 > so that the design people (who edit the templates, but not the code)=20 > can set the page title (which is a purely presentational issue most of = > the time) > right in the template. >=20 >=20 > I am aware that this is probably difficult to implement, so just for=20 > the long-term wish-list... >=20 >=20 > Thilo >=20 >=20 >=20 > ------------------------------------------------------- > 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 > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users > |