[Zope] A little DTML help

Chris Larson clarson@changeling.com
Thu, 29 Apr 1999 16:41:44 -0500


OK, I'm being a nidiot. I'm trying to create a horizontal menu bar, which 
will call 'changelingTemplate' and set the content from the chosen menu 
item. I spent so much time trying to get Zope installed, I'm just now 
getting into the creature. I suspect I've been staring at this problem 
for so long I've drastically overcomplicated my approach. At this point, 
for the life of me, I cannot figure out how to call my content with 
changelingTemplate, but I suspect I'm going to be stunned at how simple 
it is. What I'm hoping is that I can avoid adding anything to the content 
files other than the actual body, that is, without requiring any tags in 
the content document.

I've tried and tried to find some simple examples. I'd suggest that 
before the big push at LinuxExpo, someone toss up several basic samples 
for the hordes soon to descend upon us.

Assume the site structure goes something like this:

/
/changelingMenu     <--The menu method
/content/           <--The parent for my content items
/content/file1
...
/content/fileN
/content/changelingTemplate

The following is the DTML for my menu. Basically, it scans for items with 
the property 'menuText' and creates a menu with those items. Ignore the 
HREF #call. That's where I'm stumbling.

<---------changelingMenu Method----------------->
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=480>
     <TR ALIGN=CENTER>
<!--#with "PARENTS[0]"-->
     <!--#in "objectValues(['DTML Document'])"-->
          <!--#if menuText-->
          <TD VALIGN=MIDDLE>
               <A HREF=<!--#call 
"REQUEST.set('page_stuff',id)"-->changelingTemplate>
                    <FONT FACE=ARIAL SIZE=-1>
                         <!--#var menuText--><BR>
                    </FONT>
               </A><BR>
          </TD>
          <!--#/if-->
     <!--#/in-->
<!--#/with-->
     </TR>
</TABLE>

Thanks much,

Chris Larson
Changeling, Inc