[Zope] Including proper object from subfolders
Wed, 05 Mar 2003 17:23:34 +0100
Yet one problem (resulted from my low knowledge of Zope):
Let's assume we have following files in following directory structure (for
example on www.site.com server):
site/index_html (DTML document)
site/content (DTML document, plain HTML)
site/standard_html_header (DTML document)
site/subdirectory1/content (DTML document, plain HTML)
site/subdirectory2/content (DTML document, plain HTML)
site/subdirectoryN/content (DTML document, plain HTML)
'index_html' file has for example this content:
In 'standard_html_header' is some site header (not important for us), and
'content' in each folder is some static HTML content.
Now I'd like to achieve this: when user accesses the
'http://www.site.com/site/subdirectory1/' , he will get displayed the
common header and the content of 'site/subdirectory1/content' file. If he
accesses 'http://www.site.com/site/subdirectory2/' , he will get displayed
the common header and the content of 'site/subdirectory2/content' file etc.
If he accesses site root 'http://www.site.com/site/', he will get displayed
header and content in 'site/content'.
This would work without problem, if the 'site/content' file would be moved
to some subdirectory 'e.g. site/index/content' - but I would like to leave
this file in the perent folder and get the content from subfolders only by
enhancing index_html for some function - and this function I don't know.
So, the index_html should look somehow like this:
- simply said, I need something which I can replace
##get_folder_where_the_request_came_from## with, to make it work :). Is
there some object or function, which will return the object of folder of
current site request to help with this?
Thanks a lot for any answer!