Is the code you used in a DTML Method or a DTML Document?
I had it in a DTML Method. It was in the standard public interface index_html that is a DTML method.
Is it in a DTML Method being called from a DTML Document?
No, the standard_html_header calls the method. Actually, I just copied the code/instructions from the Zope Book (http://www.zope.org/Members/michel/ZB/). Incidentally, once I put your <dtml-with ... modification, it worked just fine. Thanks! This however, begs (a newbie's) question as to how to get a listing of the current folder's contents. I.e., using a DTML Method (such as the stadard index_html), what changes to the code that you provided would look up the current container's (folder) objects? Wouldn't you use something like PARENT, i.e., the parent object of the DTML method that is used to render the web page? Or would you simply modify the I'm going to suggest to the author of the upcoming Zope book to add a little of your explanation here, as it would be very instructive. You helped. Thanks very much. Ron ./.
You could try something like:
<dtml-with expr="resolve_url(BASE0+'/')"> <ul> <dtml-in expr="objectValues('Folder')"> <li><a href="&dtml-absolute_url;"><dtml-var title_or_id></a><br></li> </dtml-in> </ul> </dtml-with>
The resolve_url(BASE0+'/') should give you a reference to the top Zope object (root).
hth
Phil phil.harris@zweb.co.uk
----- Original Message ----- From: "Ronald L. Chichester" <complaw@hal-pc.org> To: <zope@zope.org> Sent: Sunday, October 08, 2000 8:58 PM Subject: [Zope] DTML Method not working
I took some code that was in the (work-in-progress) O'Riley book on Zope. In that example, then had a DTML Method used for identifying folders and hyperlinking to them. The code is as follows:
<ul> <dtml-in expr="objectValues('Folder')"> <li><a href="&dtml-absolute_url;"><dtml-var title_or_id></a><br></li> </dtml-in> </ul>
The problem is, it doesn't work. I know the method is being invoked because there is some other text that is indeed being inserted. Moreover, there are sub-folders in the folder that calls the method.
Does anyone know what the problem is? Is it a permission issue. The standard_html_header and _footer, show up just fine, along with logos and such. The only part that isn't showing up is the stuff that was supposed to be generated by the <dtml-in> block.
Any hints?
Thanks in advance.
Ron ./.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )