Accessing pythonscripts in different branch
Hi, On my zope site I use some pythonscripts. I don't like them to be in the root of my site, but can't figure out how to access them when they'r not in the root. For example the menu on top of my webpages is created depending on the main branche of my site. I use a python script for that by including it in my standard_dtml_header file like this: <dtml-var expr="topmenu('branch1')"> The pythonscript "topmenu" is in the rootfolder of my site. Is it possible to move this script to a folder "scripts" and access the script on every page in my website? (How?) (I could find ways of accessing/using pythonscripts from different locations by URL in the Zope Book - feeding/vacinating hippos and stuff, but not in a dtml-var) Thanks, Ria Marinussen
Ria Marinussen wrote:
On my zope site I use some pythonscripts. I don't like them to be in the root of my site, but can't figure out how to access them when they'r not in the root.
For example the menu on top of my webpages is created depending on the main branche of my site. I use a python script for that by including it in my standard_dtml_header file like this: <dtml-var expr="topmenu('branch1')">
The pythonscript "topmenu" is in the rootfolder of my site.
Is it possible to move this script to a folder "scripts" and access the script on every page in my website? (How?)
- Create Folder 'scripts' - Move PythonScript 'topmenu' to Folder 'scripts' - Change standard_html_header to: <dtml-var expr="scripts.topmenu('branch1')"> HTH, -mj
On Tue, 25 Mar 2003 12:27:24 +0100 GMT (..12:27 where i live(GMT+1) ) Ria Marinussen asked the Zope mailinglist about the following: RM> On my zope site I use some pythonscripts. I don't like them to be in the RM> root of my site, but can't figure out how to access them when they'r not in RM> the root. ... RM> I use a python script for that by including it in my RM> standard_dtml_header file like this: RM> <dtml-var expr="topmenu('branch1')"> ... RM> Is it possible to move this script to a folder "scripts" and access the RM> script on every page in my website? (How?) <dtml-var expr="scripts.topmenu('branch1')"> everything inside expr="" is evaluated as a python expression if you are not using expr="", the following should also work (although not with the explicit paramter-passing): <dtml-with scripts> <dtml-var topmenu> </dtml-with> -- Geir Bækholt
participants (3)
-
Geir Bækholt -
Maik Jablonski -
Ria Marinussen