[ZDP] Re: ZDP News Folders

Maik.Röder roeder@berg.net
Mon, 17 Jan 2000 16:41:54 +0100


Hi !

Emmanuel Rousselle schrieb:

> >I want to brainstorm with you all on the ZDP news folders. With the help of
> >the NewsFolder we can place everyware News updates.

You can go to the news folder with a lot of <dtml-with> statements,
and the choose the amount of news you want to display.

<H1>News</H1>
<dtml-with xyz>
...
<dtml-with news>
<dtml-var ListLatestWeekNews>
<P>
<A HREF="<dtml-var "absolute_url()">">[News Archive...]</A>
</dtml-with>
...
</dtml-with>

> >However I think that we must be careful with placing lot's of news-pages.
> >I'm in for the idea that every project should have it's own newsfolder, but
> >we also should have a general news page (eg the stuff I'm now doing weekly)
> >and not more newspages.

You can use ZCatalog with something like (Untested):

<dtml-in "Catalog({'meta_type': 'News'})">
  <dtml-if sequence-start>
     <ul>
  </dtml-if>          

  <li>         
  <a href="<dtml-var "Catalog.getpath(data_record_id_)">">
  <dtml-if name>
  <dtml-var name><dtml-else><dtml-var id>
  </dtml-if></a>
  </li>

  <dtml-if sequence-end>
     </ul>
  </dtml-if>          
</dtml-in>

The NewsItems still need to register with the ZCatalog automatally,
which is not implemented yet. You would have to [Find Items to ZCatalog]
in the root Catalog to collect News.

> There should be a way to specify the number of news items on a project's
> new page for obvious reasons (the rest of news items would be available by
> following a "to archive" link).

Two examples:

http://zdp.zope.org:8080/ZDP
http://zdp.zop.org:8080/ZDP/projects/zdptools

> On the "consolidated" news page there
> should be a mechanism to ensure that all projects have the same "exposure":
> the idea is to prevent the case where just a few projects fill up the news
> space - because they have a lot of news items that week - and prevent some
> other project news to be "posted".

Just create a special ListProjectsEqualExposure in NewsFolder.
 
> There is one thing that could be improved on the current news list: instead
> of having the first few words of the weekly ZDP "newsletter", why not
> display some kind of summary of the items discussed? Like: "Guidelines for
> product writers, ZCL progresses, Check-out the cool ZDP-Tools, bla bla
> bla". You get the idea.

This can be done by adding an abstract method to the News. 
The constructor and add methods would have to be changed a little.
Just look at WebSiteLinkFolder for an implementation.

Greetings,

Maik Röder