Ciao,<div>sempre così, ad occhio, potresti utilizzare lo stesso codice del portlet di weblion</div><div>[..]</div><div><span class="Apple-style-span" style="font-family: Frutiger, Univers, 'Helvetica Neue', arial, helvetica, sans-serif; font-size: 13px; border-collapse: collapse; line-height: 19px; "><pre style="white-space: pre-wrap; word-wrap: break-word; font-family: Monaco, 'Courier New', Courier, monospace; font-size: 13px; padding-top: 0.25em; padding-right: 0.25em; padding-bottom: 0.25em; padding-left: 0.25em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(215, 215, 215); border-right-color: rgb(215, 215, 215); border-bottom-color: rgb(215, 215, 215); border-left-color: rgb(215, 215, 215); color: rgb(0, 0, 0); background-color: rgb(247, 247, 247); overflow-x: auto; overflow-y: auto; margin-top: 1em; margin-right: 1.75em; margin-bottom: 1em; margin-left: 1.75em; ">
<img tal:replace="structure pobj/image" /></pre></span>Vito</div><div><br></div><div><div class="gmail_quote">Il giorno 24 dicembre 2009 09.42, Fabrizio Rota <span dir="ltr"><<a href="mailto:fabrizio.rota@gmail.com">fabrizio.rota@gmail.com</a>></span> ha scritto:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Con structure pobj/Text avevo già provato<div>Con structure pobj/getText funziona bene!</div><div>GRAZIE</div><div><br>
</div><div>Sapresti anche come fargli estrarre la immagine che opzionalmente si può inserire nella news e che viene usata nella vista riassuntiva?</div>
<div>Grazie ancora</div><div><br></div><div>faber</div><div><br><div class="gmail_quote">Il giorno 24 dicembre 2009 09.35, Vito Falco <span dir="ltr"><<a href="mailto:vitofalco@gmail.com" target="_blank">vitofalco@gmail.com</a>></span> ha scritto:<div>
<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ciao,<div>perchè usi il SearchableText?</div><div><br></div><div>Io, ad occhio, avrei fatto un <div tal:replace="structure pobj/getText">This element is a comment.</div> </div>
<div>oppure</div><div><div tal:replace="structure pobj/Text">This element is a comment.</div> </div>
<div><br></div><div>Vito<br><br><div class="gmail_quote">Il giorno 24 dicembre 2009 09.26, Fabrizio Rota <span dir="ltr"><<a href="mailto:fabrizio.rota@gmail.com" target="_blank">fabrizio.rota@gmail.com</a>></span> ha scritto:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>
Sto modificando questo codice di weblion <a href="https://weblion.psu.edu/trac/weblion/wiki/RandomImagePortlet" target="_blank">https://weblion.psu.edu/trac/weblion/wiki/RandomImagePortlet</a> (usato per mostrare in un portlet una immagina casuale) in modo che mostri il contenuto di una news casuale.<div>
<br><div><br></div><div><span style="font-family:Frutiger, Univers, 'Helvetica Neue', arial, helvetica, sans-serif;font-size:13px;line-height:19px"><pre style="font-family:Monaco, 'Courier New', Courier, monospace;font-size:13px;padding-top:0.25em;padding-right:0.25em;padding-bottom:0.25em;padding-left:0.25em;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(215, 215, 215);border-right-color:rgb(215, 215, 215);border-bottom-color:rgb(215, 215, 215);border-left-color:rgb(215, 215, 215);color:rgb(0, 0, 0);background-color:rgb(247, 247, 247);overflow-x:auto;overflow-y:auto;margin-top:1em;margin-right:1.75em;margin-bottom:1em;margin-left:1.75em;background-repeat:initial initial">
<div metal:define-macro="portlet">
<div id="portlet_randomphoto"
tal:define="presults python:context.portal_catalog(portal_type='Image',
path='/yaks/images-randomize')"
tal:condition="presults">
<div>
<span tal:define="pobj python:random.choice(presults).getObject()">
<img tal:replace="structure pobj/image" />
<span tal:content="string:${pobj/Description}">[displays description of image]</span>
</span>
</div>
</div>
</div></pre></span><div><br></div><div><br></div><div>Sto provando con questo codice</div><div><br></div><div><div><div metal:define-macro="portlet"></div><div> <div id="portlet_randomphoto"</div>
<div> tal:define="presults python:context.portal_catalog(portal_type='News Item',</div><div> path='/test/news')"</div><div> tal:condition="presults"></div>
<div> <div></div><div><br></div><div> <span tal:define="pobj python:random.choice(presults).getObject()"></div><div> </div><div> <span tal:content="string:${pobj/Description}">[displays description of image]</span></div>
<div> <div tal:replace="structure pobj/SearchableText">This element is a comment.</div> </div><div> </span></div><div> </div></div><div> </div></div>
<div></div></div><div><br></div><div>Ma non riesco ad estrarre il testo della news in modo decente.</div><div>Con SearchableText, infatti, il testo viene fuori come non formattato e si prende pure la descrizione della immagine a commento della news.</div>
<div>Forse che il testo della news non viene estratto con getObject()?</div><div>C'è qualche altro modo di ottenerlo?</div><div><br></div><div>a presto</div><div><br></div><div>faber</div></div><div><br></div><div>--------------------</div>
"Life is what happens to you while you're busy making other plans" - J. Lennon<br>
</div></div>
<br></div></div>_______________________________________________<br>
Plone-IT mailing list<br>
<a href="mailto:Plone-IT@lists.plone.org" target="_blank">Plone-IT@lists.plone.org</a><br>
<a href="http://lists.plone.org/mailman/listinfo/plone-it" target="_blank">http://lists.plone.org/mailman/listinfo/plone-it</a><br>
<a href="http://www.nabble.com/Plone---Italy-f21728.html" target="_blank">http://www.nabble.com/Plone---Italy-f21728.html</a><br></blockquote></div><br><br clear="all"><br>-- <br>"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<br>
</div>
<br>_______________________________________________<br>
Plone-IT mailing list<br>
<a href="mailto:Plone-IT@lists.plone.org" target="_blank">Plone-IT@lists.plone.org</a><br>
<a href="http://lists.plone.org/mailman/listinfo/plone-it" target="_blank">http://lists.plone.org/mailman/listinfo/plone-it</a><br>
<a href="http://www.nabble.com/Plone---Italy-f21728.html" target="_blank">http://www.nabble.com/Plone---Italy-f21728.html</a><br></blockquote></div></div></div><br><br clear="all"><br>-- <br><font color="#888888">Fabrizio</font><div class="im">
<br>--------------------<br>"Life is what happens to you while you're busy making other plans" - J. Lennon<br>
</div></div>
<br>_______________________________________________<br>
Plone-IT mailing list<br>
<a href="mailto:Plone-IT@lists.plone.org">Plone-IT@lists.plone.org</a><br>
<a href="http://lists.plone.org/mailman/listinfo/plone-it" target="_blank">http://lists.plone.org/mailman/listinfo/plone-it</a><br>
<a href="http://www.nabble.com/Plone---Italy-f21728.html" target="_blank">http://www.nabble.com/Plone---Italy-f21728.html</a><br></blockquote></div><br><br clear="all"><br>-- <br>"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<br>
</div>