[Zope] Using standard_html_header to display banner

Steve Spicklemire steve@spvi.com
Mon, 29 Apr 2002 05:42:20 -0500


Sorry.. I misunderstood your problem. In that case use a DTML Document, 
and use PARENTS[0] to get to the folder:

e.g.,

sub-folders:
<dtml-in "PARENTS[0].objectIds('Folder')">
<a href="<dtml-var sequence-item url_quote>">&dtml-sequence-item;</a><br>
</dtml-in>

-steve

On Monday, April 29, 2002, at 05:00  AM, Frederic Faure wrote:

> At 20:13 28/04/2002 -0500, Steve Spicklemire wrote:
>> Use a DTML method, but use <dtml-var document_title>
>
> Thx much Steve, but as explained before, it doesn't work as planned. 
> Try this if you want to see the problem:
> 1. Create a test/ folder
> 2. Inside this folder, create a DTML Method object with ID = 
> standard_html_header with the following code:
> <html><head><title><dtml-var title></title></head>
> <body>document_title = <dtml-var document_title><P>title = <dtml-var 
> title><P>
> 3. Still inside the folder, create a DTML Method object with ID = 
> dtml_method.html with the following code:
> <dtml-var standard_html_header>
> 4. Still inside the folder, create a DTML Document object with ID = 
> dtml_document.html with the following code:
> <dtml-var standard_html_header>
> 5. Aim your browser at http://localhost:8080/test/dtml_method.html and 
> http://localhost:8080/test/dtml_document.html
>
> Result: With both objects, <dtml-var document_title> displays the Title 
> section of the standard_html_header object ("Standard HTML Header", in 
> my case), but dtml_method.html displays "title = This is a test 
> folder", while dtml_document.html displays "title = This is a Document"
>
> Conclusion:
> - If the document itself is a DTML Method, <dtml-var title> displays 
> the Title section of the _container_ where the document lives
> - If the document is a DTML Document, <dtml-var title> displays the 
> Title section of the _document_ itself
>
> Therefore, the designer has to decide whether s/he wishes to display a 
> document's properties dynamically through a common standard_html_header 
> DTML Method object (use DTML Document) or embed some code (use DTML 
> Method), but not both.
> Bummer, because in index_html, in addition to displaying a banner 
> dynamically through standard_html_header, I'd like to have Zope display 
> links to all the documents located in sub-folders so that I wouldn't 
> have to update index_html when a user has added a document in a 
> sub-folder... I'll keep reading the Zope book to see if those two goals 
> can be achieved through other ways.
>
> Thx again
> Eddie.
>
>
>
> _______________________________________________
> 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 )