News Item properties

[email protected]
Newsgroups gmane.comp.web.zope.database
Message-ID <[email protected]>
Ciao,

sto cercando di visualizzare su un page template zope (che tra l'altro e'
l'home page index_html) l'ultima news inserita via plone.

sono andato in
*/portal_skins<http://adelchi.org:9673/Engim0.2/portal_skins/manage_workspace>
/plone_portlets<http://adelchi.org:9673/Engim0.2/portal_skins/plone_portlets/manage_workspace>
/portlet_news<http://adelchi.org:9673/Engim0.2/portal_skins/plone_portlets/portlet_news/manage_workspace>
*

e ho preso il pezzo di codice che mi serviva:

<div metal:define-macro="portlet"
     tal:define="results python:request.get('news',
here.portal_catalog.searchResults( portal_type='News Item'
                                                                      
              , sort_on='Date'
                                                                      
              , sort_order='reverse'
                                                                      
              , review_state='published')[:5]);
		"

     tal:condition="python:test(template.getId()!='news' and results, 1, 0)">

    <div class="portlet" id="portlet-news">

        <h5 i18n:translate="box_news">News</h5>

        <div class="portletBody">

            <tal:block tal:repeat="obj results">

                <div tal:define="oddrow repeat/obj/odd"
                     tal:attributes="class python:test(oddrow,
'portletContent even', 'portletContent odd')">

                    <a href=""
                       tal:attributes="href obj/getURL;
                                       title obj/Description">
                        <tal:block replace="structure here/newsitem_icon.gif"/>
                        <span tal:replace="python:test(obj.Title,
obj.Title, obj.getId)"> Extended Calendar Product </span>
                    </a>

etc etc etc



il fatto e' che otre al Title mi servirebbero anche i primi 500 caratteri
della news (un abstract da mettere in home page col link alla news intera)
ho provato con:

                        <span tal:replace="python:test(obj.Dcoument,
obj.Dcoument, obj.getId)"> Extended Calendar Product </span>
                        <span tal:replace="python:test(obj.Text,
obj.Text, obj.getId)"> Extended Calendar Product </span>
                        <span tal:replace="python:test(obj.Content,
obj.Content, obj.getId)"> Extended Calendar Product </span>
                        <span tal:replace="python:test(obj.Body,
obj.Body, obj.getId)"> Extended Calendar Product </span>


ma non riesco a beccare il contenuto.... ho cercato su manuali e su google e
sul tab 'doc' di zope ma nulla....



Matteo

_______________________________________________
Zope-DB mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope-db
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.