[Plone-UI] Navigation for news

Marc Pampols marc at marcpampols.com
Sat Jun 14 08:53:25 UTC 2008


Ok! :) well, AFAIK you can't easy create this dynamically in Plone, but you
can try something like this... 2 ideas:

(Maybe there is a better option, but...)

1.-

First you have to create a python script that dynamically creates the
collection objects with createObject()


Then you can create a cronjob in zope, to execute every X days a Python
script, adding clock-server to your zope.conf or buildout, in case of
buildout:
zope-conf-additional =
    <clock-server>
      method /your_python_script
      period
      user admin
      password admin
      host localhost
    </clock-server>


2.-

Create all years and setup every one with a publish date, so the 2008
collection will show up when its 01 JAN 2009




-
Marc Pampols
http://www.plone-es.org


On Sat, Jun 14, 2008 at 9:24 AM, prospector <prospector42 at gmail.com> wrote:

> Thanks Marc, good idea! It works! :)
>
> But, I have to do it for every year (or month). I have in mind to create a
> navigation portlet with years (and maybe months). Is it possible to create
> the Collection dinamicly? E.g. with passing some arguments?
>
> Bostjan
>
>
> On 2008.6.13, at 21:32, Marc Pampols wrote:
>
>  Hi!
>>
>> I suppose that you are using version 3.x, then you can use a content type
>> called "Collections" (Smart Folders in Plone 2.x), create one for each year
>> and setup a criteria for each one:
>>
>> Check this manual:
>> http://plone.org/documentation/manual/plone-3-user-manual/using-
>> collections/referencemanual-all-pages
>>
>> Luck!
>>
>> -
>> Marc Pampols
>> http://www.plone-es.org
>>
>>
>> On Fri, Jun 13, 2008 at 8:19 PM, prospector <prospector42 at gmail.com>
>> wrote:
>> Hello!
>>
>> I am just started having fun with Plone :)
>> I section News I would like to have navigation by years. When I click on
>> specific year I want to filter News by selected year.
>> How can I achive that?
>>
>> Thanks for your answers,
>> Bostjan
>>
>>
>>
>> _______________________________________________
>> UI mailing list
>> UI at lists.plone.org
>> http://lists.plone.org/mailman/listinfo/ui
>>
>>
>
> _______________________________________________
> UI mailing list
> UI at lists.plone.org
> http://lists.plone.org/mailman/listinfo/ui
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-ui/attachments/20080614/15084bef/attachment-0002.html>


More information about the UI mailing list