Funziona perfettamente!
G R A Z I E !!!!!!!!!

faber


Il giorno 11 gennaio 2010 18.28, Vito Falco <vitofa...@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 <vitofa...@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.r...@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@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@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
_______________________________________________
Plone-IT mailing list
Plone-IT@lists.plone.org
http://lists.plone.org/mailman/listinfo/plone-it
http://www.nabble.com/Plone---Italy-f21728.html

Rispondere a