[Zope] reading text based config file
Tino Wildenhain
tino@wildenhain.de
Sun, 29 Apr 2001 18:52:22 +0200
Hi Marcus,
this would be the wrong way[tm] to do the job. Unlike a classic,
file based webserver zope knows all its objects. So the best way
is to let zope calculate the navigation. No flat file reading, no
problem with parsing them and no problem with writing them :-)
You can use the tree-tag or dtml-in to do this.
look for "objectValues" and stuff in the documentation.
HTH
Tino Wildenhain
> Hi there,
>
> what's the best way to read a flat file like this line by line and split
> each line to three variables?
>
> 1:menuname:url
> 1.1:submenuname:url
> 1.2:submenuname:url
> 2:nenuname:url
> 2.1:sub
> ...
>
> background: i'd like to create a global navigation dtml-medthod. Only the
> configuration file should be replaced depending on the position in the
> file system.
>
> Thank you
> Marcus
>
> _______________________________________________
> 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 )