[Zope] Wrapping pre-existing content
Mario Valente
mvalente@ruido-visual.pt
Thu, 08 Mar 2001 12:00:44 +0000
At 10:52 3/8/01 -0000, Phil Harris wrote:
>I have a hierarchy of 'documents', lots of them circa. 300 and the number
>will continue to grow (dramatically).
>
>These 'documents' could be of any type, XML/HTML/Images etc.
>
>What I want to do is to have some way of wrapping these documents to include
>a header and footer, but I want to do this at render time not before.
>
>
>Any ideas?
>
Lets say your pre-existing content is at folder 'documents' in several
subfolders ( /documents/a, /documents/b, etc).
Rename each pre-existing document to something like 'render' or
'content' or 'inside' or 'center' or whatever you want.
Put a single index_html file at the Zope root. This should contain your
standard layout (header, footer, sidebars, etc)
Now, assuming you put each doc into its own /document subfolder
and renamed it 'content', simply edit index_html (at the root) and
introduce a <dtml-var content> call where the content should appear.
Through the wonders of acquisition you should be able do request
/document/a , /document/b , etc. and see your documents enclosed
within your layout. You can still get to your documents (without layout)
by goint to /document/a/content.
C U!
-- Mario Valente