[ZPT] Re: single TAL file for displaying contents!
Tonico Strasser
contact_tonico at yahoo.de
Tue Jul 27 06:24:34 EDT 2004
vaibhav uprety wrote:
> Hi,
>
> I have a list of folders in my site in which i keep
> documents for different locations. I am using the
> following TAL code to display the files in a
> particular folder.
[snipped pt code]
> But i have to copy this code to every folder in order
> to display the file contents of that particular
> folder.
>
> Is it possible to display the contents of different
> folders by creating a single page template?
Name your template 'index_html' and place it one level higher:
<site-root>
<data-folder>
'index_html'
<folder-a>
<folder-b>
<folder-c>
Or name your page template 'folder_contents' and put a 'index_html' DMTL
medthod width '<dtml-var folder_contents>' in every folder:
<site-root>
'folder_contents'
<folder-a>
'index_html'
<folder-b>
'index_html'
<folder-c>
'index_html'
Or if you use CMF, you can use SkinnedFolders, they can have their own
'view' instead of acquiring the 'index_html'.
HTH
Tonico
More information about the ZPT
mailing list