[python] Re: [Zope] WISH LIST - idea of new, DTMLRelation object

Tino Wildenhain tino na wildenhain.de
Pátek Srpen 22 11:05:06 CEST 2003


Hi Jaroslav,


perhaps you want to use <dtml-with rootfolder> ...navigation.. </dtml-with>

?

Rootfolder could be the object you want to be the root (of course)
or in case of ZopeRoot, you get it via REQUEST.PARENT[0]

However, before beating the dead horse, you should consider
replacing your routine with a python script, which could
also use ZCatalog in place of ObjectValues() - this saves
Memory and time since not all Objects have to be activated.

This approach would also help you to go the way from
DTML to ZPT which is recommended.

Greetings
Tino

For your

--On Mittwoch, 9. Oktober 2002 08:35 +0200 Jaroslav Lukesh 
<lukesh na k-net.cz> wrote:

> Hi all,
>
> I have an idea of new Zope DTML object with specific things. Dear Zope
> developers, please take attention to following lines:
>
> Imagine folder structure as
>
> /
> 	/folder1
> 	DTMLMethod
> 	DTMLDocument
> 	DTMLRelation
> 	image.gif
> 		/folder11
> 			/folder111
> 			/folder112
> 		/folder12
> 	/folder2
> 		/folder21
>
> All three DTML* contains same code:
>
> <dtml-in "objectValues('Folder')">
> 	<dtml-var id><br>
> </dtml-in>
> <img scr="<dtml-var absolute_URL>/image.gif">
>
> Imagine what is doing that DTML Document or DTML Method are called from
> inside of /folder11. DTML Document make bad, but still functional (due
> acquisition) link to image.
>
> But DTML Relation will still give that same output, independent from where
> you call it:
>
> folder11
> folder12
> <img src="http://domain/folder1/image.gif">
>
> Output is still independend from where you calling that DTMLRelation and
> give you right URL paths (relative or basolute).
>
> I think that DTML Relation (or you can call it better) should be very
> usefull, for example:
>
> 1. for navigation structure when you want to have constant navigation
> buttons what are dynamically generated from folder structure that have
> strong changes in any folder names
> 2. for image menus, where it give right path to images folder instead of
> acquired images
> etc. (I now, you can specify path with <dtml-var BASE1>/images/image.gif)
>
> Many thanks for your kindly attention.
>
> If it have  simple solution by standard DTML code, let me know that code,
> please.
>
> Best Regards
>
> J. Lukesh
>
> _______________________________________________
> Zope maillist  -  Zope na 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 )





Další informace o konferenci Python