[ZDP] updating ZDP General news to news classes of Maik

Maik Röder roeder@berg.net
Wed, 12 Jan 2000 17:41:56 +0100


Hi Tom !

Tom Deprez wrote:
> 
> Hi Maik,
> 
> I made a Newsfolder class and added news classes in it.
> 
> However, I like my news presentation better then the one we now.
> How can I change this?
> I can make a new news presentation in NewsFolder Product, but how can I be
> sure
> that NewsFolder will use this presentation?

The Bottom DTML method of NewsFolder decides what kind of list is
presented:

Bottom:
<dtml-var ListNews>

You want to override this behaviour. Put your kind of list
inside the NewsFolder ZClass:

MyOwnList:
...

Then, you have to go into the ZClass instance, and make it
use another type of listing:

Put a standard_zdp_template method inside the NewsFolder.
Copy the content of the Template method from DocumentFolder over
to standard_zdp_tenplate.

<dtml-var standard_html_header>
<dtml-var Top>
<P>
<dtml-var Service_Management>
<P>
<dtml-var Header>
<P>
<dtml-var Middle>
<P>
<dtml-var Main>
<P>
<dtml-comment>
deleted Bottom
</dtml-comment>
<B>My news list</B>
<dtml-with news>
<dtml-var MyOwnList>
</dtml-with>
<dtml-var standard_html_footer>

This works because DocumentFolder first looks whether there
is a file standard_zdp_template in the folder and if it is there,
it is used. If the file is missing, the Template is used.

Greetings,

Maik