[Zope] How-to Bypass DTML Code?
Andrew Kenneth Milton
akm@mail.theinternet.com.au
Tue, 27 Jun 2000 11:56:33 +1000 (EST)
+----[ Nestor A. Diaz L. ]---------------------------------------------
| Hi, anyone know how to bypass the dtml-code, that's because i'm writing a
| howto with showing the use of some "dtml-tags" so it tries to interpreting
| it rather than only showing them.
|
It's easy:-
Make a method called
printCode which contains one line:
<dtml-return "CodeToPrint">
Then to display a method or a document:-
<dtml-var "printCode(CodeToPrint=standard_html_header)">
Will print your standard_html_header, you will probably want
<dtml-var "printCode(CodeToPrint=standard_html_header)" newline_to_br>
The advantage of this, is that you can use actual methods (if you're doing
a tutorial). So when you change the method, your documentation updates itself.
If you just want to pass strings into printCode, you can do that too.
<dtml-var "printCode(CodeToPrint='<dtml-var FunnyVar>')">
--
Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton
The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 |
ACN: 082 081 472 | M:+61 416 022 411 | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|