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, &#39;Helvetica Neue&#39;, 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, &#39;Courier New&#39;, 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; ">
&lt;img tal:replace=&quot;structure pobj/image&quot; /&gt;</pre></span>Vito</div><div><br></div><div><div class="gmail_quote">Il giorno 24 dicembre 2009 09.42, Fabrizio Rota <span dir="ltr">&lt;<a href="mailto:fabrizio.rota@gmail.com">fabrizio.rota@gmail.com</a>&gt;</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">&lt;<a href="mailto:vitofalco@gmail.com" target="_blank">vitofalco@gmail.com</a>&gt;</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 &lt;div tal:replace=&quot;structure pobj/getText&quot;&gt;This element is a comment.&lt;/div&gt; </div>

<div>oppure</div><div>&lt;div tal:replace=&quot;structure pobj/Text&quot;&gt;This element is a comment.&lt;/div&gt; </div>
<div><br></div><div>Vito<br><br><div class="gmail_quote">Il giorno 24 dicembre 2009 09.26, Fabrizio Rota <span dir="ltr">&lt;<a href="mailto:fabrizio.rota@gmail.com" target="_blank">fabrizio.rota@gmail.com</a>&gt;</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, &#39;Helvetica Neue&#39;, arial, helvetica, sans-serif;font-size:13px;line-height:19px"><pre style="font-family:Monaco, &#39;Courier New&#39;, 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">
&lt;div metal:define-macro=&quot;portlet&quot;&gt;
     &lt;div  id=&quot;portlet_randomphoto&quot;
             tal:define=&quot;presults python:context.portal_catalog(portal_type=&#39;Image&#39;,
                         path=&#39;/yaks/images-randomize&#39;)&quot;
             tal:condition=&quot;presults&quot;&gt;
             &lt;div&gt;

               &lt;span tal:define=&quot;pobj python:random.choice(presults).getObject()&quot;&gt;
                     &lt;img tal:replace=&quot;structure pobj/image&quot; /&gt;
                     &lt;span tal:content=&quot;string:${pobj/Description}&quot;&gt;[displays description of image]&lt;/span&gt;
               &lt;/span&gt;
          &lt;/div&gt;
     &lt;/div&gt;
&lt;/div&gt;</pre></span><div><br></div><div><br></div><div>Sto provando con questo codice</div><div><br></div><div><div>&lt;div metal:define-macro=&quot;portlet&quot;&gt;</div><div>     &lt;div  id=&quot;portlet_randomphoto&quot;</div>



<div>             tal:define=&quot;presults python:context.portal_catalog(portal_type=&#39;News Item&#39;,</div><div>                         path=&#39;/test/news&#39;)&quot;</div><div>             tal:condition=&quot;presults&quot;&gt;</div>



<div>             &lt;div&gt;</div><div><br></div><div>               &lt;span tal:define=&quot;pobj python:random.choice(presults).getObject()&quot;&gt;</div><div>                   </div><div>                     &lt;span tal:content=&quot;string:${pobj/Description}&quot;&gt;[displays description of image]&lt;/span&gt;</div>



<div>                   &lt;div tal:replace=&quot;structure pobj/SearchableText&quot;&gt;This element is a comment.&lt;/div&gt; </div><div>               &lt;/span&gt;</div><div>          &lt;/div&gt;</div><div>     &lt;/div&gt;</div>



<div>&lt;/div&gt;</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&#39;è 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>



&quot;Life is what happens to you while you&#39;re busy making other plans&quot; - 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>&quot;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&#39;s why it is so complicated.&quot; 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>&quot;Life is what happens to you while you&#39;re busy making other plans&quot; - 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>&quot;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&#39;s why it is so complicated.&quot; by Paul Rand<br>

</div>