[Zope-PTK] Need help creating subfolder for news

Tres Seaver tseaver@digicool.com
Mon, 26 Feb 2001 07:55:47 -0500 (EST)


On Mon, 26 Feb 2001, [iso-8859-1] Val=E9rie Aulnette wrote:

> Thanks for your help !
> I'll try to explain what I am trying to do.
> We need to classify our news, links, files but not in
> the personal portal because that's already possible
> but in the public space.
> I mean that when we want to read the news publicated
> by the others, we want them classified by topics.
> So I am trying to change the wizards so that when a
> user is creating a news, he has to choose from a list
> the topic of his news. Then I'll create a DTML
> Document which lists all the topics available and when
> the user clicks on one of them, he can see all the
> news dealing with this topic.
>=20
> For that, I created a new field in the database which
> is called "topic".
> The problem I have is when I want to print the
> different topics on a page, the topics are printed as
> many times as there are news dealing with this topic.
> I do need to do like a "select distinct" in SQL.
> Someone suggested me to use "uniqueValuesFor(name)".

The CMF already has a "keywords" field, 'Subject' (the name
comes fromt the Dublin Core).  I would build a keyword-based
search something like:

 <form action=3D"&dtml-portal_url;/search">

  <select name=3D"Subject">
   <dtml-in "portal_catalog.uniqueValuesFor( 'Subject' )">
    <option> &dtml-sequence-item; </option>
   </dtml-in>
  </select>

  <input type=3D"submit" value=3D" Search ">

 </form>

> I've tried it but I can't find how...
> The other problem is when we need to create a new
> topic... I need to know how works the wizards and it's
> a little bit complicated with the different steps.

The new "PortalTopic" objects are still somewhat under
development;  they allow you to create an object which
represents a "canned" catalog query.

You shouldn't need "Wizards" to make them;  you should
already be able to add them using the Zope Management
interface, and then add "criteria" objects to them to
represent the search.  They should have a great deal
more documentation over the next few weeks.

Tres.
--=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org