<dtml-if "&dtml-var; != &dtml.-var;">
How can I check in a DTML Document if a html_quot'ed variable is unequal to the unquoted var? I tried without success: <dtml-if "&dtml-var; != &dtml.-var;"> var / unquoted: &dtml-var; <dtml-else> var </dtml-if> and also: <dtml-if expr="var != _.html_quote.var"> <dtml-if expr="var != var.html_quote"> <dtml-if expr="var != &dtml.-var;"> <dtml-if expr="var != <dtml-var var html_quote>"> I don't want to create a python script for this simple problem. html_quote is a DocumentTemplate function, but not exported, or? from DocumentTemplate import html_quote if self != html_quote(self): ... -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/
I don't want to create a python script for this simple problem. html_quote is a DocumentTemplate function, but not exported, or?
I do that with the following PythonScript: ---------------------------------------------------------- ID: htmlquote Parameter List: *args ---------------------------------------------------------- from Products.PythonScripts.standard import html_quote from string import join res = [] for arg in args: res.append(html_quote(arg)) return join(res, '\n') ---------------------------------------------------------- This is the easiest and fastest solution I could find to the "html_quote problem"... sorry, I also would have loved to do it without a python script... hth, Danny
participants (2)
-
Danny William Adair -
Reini Urban