[Plone-IT] sort in base a data di pubblicazione

Fabrizio Rota fabrizio.rota a gmail.com
Lun 11 Gen 2010 17:45:03 UTC


è possibile "foraggiare" la ricerca

tal:define="presults python:context.portal_catalog(portal_type='News Item',
                         path='/romero/avvisi/libri', sort_on='effective',
sort_order='reverse')"

che qui è fatta dentro una cartella con il risultato di una collezione?
In pratica, non è che al posto di path=... si può in qualche modo linkare
una collezione?

In questo modo avrei la comodità di impostare la "logica" della ricerca con
le collezioni e la flessibilità di "stampare" il risultato del classic
portlet.....
Sarebbe proprio bello.....

grazie ancora

faber

Il giorno 11 gennaio 2010 18.31, Fabrizio Rota <fabrizio.rota a gmail.com> ha
scritto:

> Funziona perfettamente!
> G R A Z I E !!!!!!!!!
>
> faber
>
>
> Il giorno 11 gennaio 2010 18.28, Vito Falco <vitofalco a gmail.com> ha
> scritto:
>
> Dimenticavo... il codice scritto ordina per l'ultimo pubblicato, mentre per
>> stamparlo
>>
>> <div tal:define="oggetto python:presults[0]">
>>   <a tal:attributes="href oggetto/getPath">
>>     <b tal:content="oggetto/TItle" />
>>   </a>
>> </div>
>>
>> Il giorno 11 gennaio 2010 18.25, Vito Falco <vitofalco a gmail.com> ha
>> scritto:
>>
>> "presults python:context.portal_catalog(portal_type='News
>>> Item', path='/test/avvisi/libri', sort_on='effective', sort_order='desc')"
>>>
>>> Vito
>>>
>>> Il giorno 11 gennaio 2010 18.19, Fabrizio Rota <fabrizio.rota a gmail.com>ha scritto:
>>>
>>>>  Come è possibile modificare questo codice per un portlet custom
>>>>
>>>>
>>>>      <div  id="portlet_ultimo_libro_consigliato"
>>>>              tal:define="presults python:context.portal_catalog(portal_type='News Item',
>>>>
>>>>
>>>>
>>>>
>>>>                          path='/test/avvisi/libri')"
>>>>              tal:condition="presults">
>>>>                <tal:block define="pobj python:random.choice(presults).getObject()">
>>>>
>>>>
>>>>
>>>> perchè estragga non un "libro" a caso ma solo l'ultimo pubblicato?
>>>> Ho tentato con
>>>>
>>>>                <tal:block define="pobj python:presults[len(presults)-1].getObject()">
>>>>
>>>> ma sbuca l'ultimo che ho CREATO, e non quello con la DATA DI
>>>> PUBBLICAZIONE più recente.
>>>> Non uso un normale portlet "collezione" perchè mi restituisce solo il
>>>> link al libro che voglio mentre io col "mio" metodo pubblico la scheda
>>>> stessa.
>>>>
>>>> grazie in anticipo
>>>> --
>>>> Faber
>>>> --------------------
>>>> "Life is what happens to you while you're busy making other plans" - J.
>>>> Lennon
>>>>
>>>> _______________________________________________
>>>> Plone-IT mailing list
>>>> Plone-IT a lists.plone.org
>>>> http://lists.plone.org/mailman/listinfo/plone-it
>>>> http://www.nabble.com/Plone---Italy-f21728.html
>>>>
>>>
>>>
>>>
>>> --
>>> "Design is the method of putting form and content together. Design, just
>>> as art, has multiple definitions; there is no single definition. Design can
>>> be art. Design can be aesthetics. Design is so simple, that's why it is so
>>> complicated." by Paul Rand
>>>
>>
>>
>>
>> --
>> "Design is the method of putting form and content together. Design, just
>> as art, has multiple definitions; there is no single definition. Design can
>> be art. Design can be aesthetics. Design is so simple, that's why it is so
>> complicated." by Paul Rand
>>
>> _______________________________________________
>> Plone-IT mailing list
>> Plone-IT a lists.plone.org
>> http://lists.plone.org/mailman/listinfo/plone-it
>> http://www.nabble.com/Plone---Italy-f21728.html
>>
>
>
>
> --
> Fabrizio
>
> --------------------
> "Life is what happens to you while you're busy making other plans" - J.
> Lennon
>



-- 
Fabrizio
--------------------
"Life is what happens to you while you're busy making other plans" - J.
Lennon
-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: <http://lists.plone.org/pipermail/plone-plone-it/attachments/20100111/c72b0911/attachment.html>


Maggiori informazioni sulla lista Plone-IT