--- In [EMAIL PROTECTED], Randy Edwards <[EMAIL PROTECTED]> wrote:
>appropriate place in that page, do a '<dtml-var "modules.leftbuttons">' and
>have that code inserted into the page.
>    That was my thinking.  "leftbuttons" views properly by itself.  
>when I try that dtml-var statment above, the page displays raw HTML. 
>Obviously I'm using a wrong tactic or am not grasping a concept here. 
>Anyone want to smack me (again:-) with a clue-bat?  TIA.

No, I won't smack you. Newbies and Oldies alike go through this problem 
again and again. It's part of the Zope Voodoo ritual that everyone has to 
dance. :)

In short, use

  <dtml-var "modules.leftbuttons(_.None, _)">

and see the magic before your eyes.

Now, a longer explanation. When you use "module.leftbuttons", Zope does NOT 
call the leftbuttons method, intead, it tries to get its representation 
string (I think.)

You will soon get used to the weirdness of DTML, and you will know that the 
following three approaches

(1) <dtml-var "modules.leftbuttons">

(2) <dtml-var "modules.leftbuttons(_.None, _)">

(3) <dtml-with modules>
        <dtml-var leftbuttons>

all have subtle differences that haunt Newbies and Oldies alike. If you can 
tell the difference, congratulations, you've graduated from the Zope 
Elementary School and understood how the namespace voodoo works. Otherwise, 
keep consulting the manuals or the newsgroup. :)

Hung Jung

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to