Il giorno 12 gennaio 2010 11.37, Vito Falco <vitofa...@gmail.com> ha
scritto:

> Ciao,
> puoi spiegare meglio il tuo obiettivo? Non riesco a fornirti una risposta
> se non capisco la domanda :)
>
Certamente.
La riga
presults python:context.portal_catalog(portal_type='News Item',
                         path='/romero/avvisi/libri', sort_on='effective',
sort_order='reverse')
fa una ricerca sul catalog cercando le news che stanno in una certa
cartella.

Scrivere questa riga non è magari difficile (per me un po' lo è......) ma
certamente le ricerche si possono "costruire" in modo "comodo" con le
collezioni, solo che poi il portlet "collezioni" invece che "stampare" il
documento che soddisfa la ricerca si limita ad elencarlo come link.

Sarebbe bello poter costruire un portlet "classic" ove la parte che "fa la
ricerca" non sia una riga come quella sopra, ma qualcosa che fa riferimento
ad una collezione costruita a colpi di click......

Spero sia un po' più chiaro ma, anche se non lo fosse, con le tue
indicazioni ho già risolto per cui - sempre e comunque - ti ringrazio.

faber




> Vito
>
> Il giorno 11 gennaio 2010 18.45, Fabrizio Rota <fabrizio.r...@gmail.com>ha 
> scritto:
>
> è 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.r...@gmail.com>ha 
>> scritto:
>>
>> 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
>>>
>>
>>
>>
>> --
>> 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
>>
>
>
>
> --
> "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