[htmltmpl] Variable syntax suggestion
Brought to you by:
samtregar
From: Michael L. <mi...@go...> - 2004-11-19 18:56:08
|
Sam, et all: I would like to write a patch to allow single XHTML / HTML compliant variable substitutions. Any chance something like this would get implemented? I have used {%var_name%}, implemented as a filter for quite some time. Currently it is impossible to add vars inside HTML tags and validate the HTML. Also you cannot edit templates in wysiwyg mode without pre/post processing. This doesn't really matter as much with the looping and logic constructs = as HTML comment style tags work okay here. Thanks, Mike Some comments from the message forum follow -------------------------------------------------------------------------= --- By: Chris Burbridge - chrisburbridge Variable syntax =A0=20 2000-05-21 02:03=20 I used HTML::Template for a project earlier this year, and I was very = happy with it. The only thing I would suggest is, some people might prefer a different delimeter for the syntax, than the "<" + ">" ones -- the = problem for me is, the designer [I would be working with] cannot see the current placeholders when the view it in a browser.=A0 =A0 My suggestion is simply to have this be configurable--simply allow the option of setting start and end delims. to a desired string. Then this = would work for everybody.=A0 =A0 Thanks. By: Andrey Melnikov - nimnul RE: Variable syntax =A0=20 2001-03-04 08:34=20 Maybe it would be better to make special debug perl-script which will replace all "<TMPL_VAR xxx>" to TMPL_VAR xxx and show the result in the browser.=A0 =A0 I could attach this script as a handler for *.tmpl and to view the = templates correctly din the browser:=A0 =A0 http://localhost/xxx.tmpl By: Michael Lloyd - mwlloyd RE: Variable syntax =A0=20 2004-11-19 13:44=20 I have run into this problem for a number of different reasons, = including XHTML HTML validation, wysiwyg editing, and many other more site = specific ones.=A0 =A0 I am using {%var_name%} and writing a regular expression, but I think = this would be a major improvement.=A0 |