Re: [Plone-IT] Pių criteri di ordinamento per una collezione

Vito Falco vitofalco a gmail.com
Sab 29 Nov 2008 10:38:58 UTC


Stavo pensando... io per questa cosa (visto che mi hanno chiesto anche altre
cose su sti benedetti eventi) ho creato una view "speciale" scopiazzandola
un po' dalla view standard dalla collezione degli eventi. E' questa:

> <metal:block use-macro="here/global_defines/macros/defines" />
> <div >
> <a tal:attributes="href python:portal_url+'/'.join(here.getPhysicalPath())"
> ><h2 tal:content="here/title_or_id" /></a>
> <a tal:attributes="href
> python:portal_url+'/'.join(here.getPhysicalPath())+'/RSS'" >RSS</a>
>     <metal:body define-macro="body_macro"
>                 tal:define="templateId template/getId">
>         <metal:listingmacro define-macro="listing">
>         <tal:topiccontents define="topicContents
> python:here.queryCatalog(batch=True, b_size=5);
>                                    batch topicContents">
>
>             <tal:listing condition="topicContents">
>
>             <div metal:define-macro="text-field-view"
>                  id="parent-fieldname-text"
>                  tal:define="text here/getText|nothing"
>                  tal:condition="text">
>                 <div metal:define-slot="inside" tal:replace="structure
> python:text.replace('../', here.getParentNode().getId() +'/')">The
> body</div>
>             </div>
>
> <dl tal:define="folderContents topicContents">
>                 <tal:entry tal:repeat="item folderContents">
>                 <tal:block tal:define="item_url
> item/getURL|item/absolute_url;
>                                        item_id item/getId|item/id;
>                                        item_title_or_id
> item/pretty_title_or_id;
>                                        item_description item/Description;
>                                        item_type item/portal_type;
>                                        item_type_title item/Type;
>                                        item_modified item/ModificationDate;
>                                        item_created item/CreationDate;
>                                        item_icon
> python:plone_view.getIcon(item);
>                                        item_type_class
> python:'contenttype-' + normalizeString(item_type);
>                                        item_wf_state
> item/review_state|python: wtool.getInfoFor(item, 'review_state', '');
>                                        item_wf_state_class python:'state-'
> + normalizeString(item_wf_state);
>                                        item_creator item/Creator;
>                                        item_start
> item/start/ISO|item/StartDate|nothing;
>                                        item_end
> item/end/ISO|item/EndDate|nothing;
>                                        use_view_action
> site_properties/typesUseViewActionInListings|python:();
>                                        show_about python:not isAnon or
> site_properties.allowAnonymousViewAbout;
>                                    ">
>                     <span tal:define="DateTime
> python:modules['DateTime'].DateTime;">
>                         <tal:date content="python:
> DateTime(item.start).Month()[:3]" />  <tal:date content="python:
> DateTime(item.start).day()" />
>                         </span>
>                     <dt metal:define-macro="listitem" >
>                             <a href="#"
>                                tal:attributes="href python:item_type in
> use_view_action and (item_url+'/view') or item_url;"
>                                tal:content="item_title_or_id">
>                                 Item Title
>                             </a>
>                     </dt>
>
>                     <dd>
>                         <span tal:omit-tag=""
> tal:condition="not:item_description">
>                             &nbsp;
>                         </span>
>                         <span al:content="item_description">
>                             description
>                         </span>
>                     </dd>
>                 </tal:block>
>                 </tal:entry>
>             </dl>
>
>             </tal:listing>
>         </tal:topiccontents>
>         </metal:listingmacro>
>     </metal:body>
> </div>
>

mi sa che faccio prima a tirarmi fuoi eventi che hanno una determinata
categoria settata e le impagino prima dei risultati veri e propri. Una
chiavica.

Vito

P.S. Ma che č sto Nexuiz? una specie di UnrealTournament?
-------------- parte successiva --------------
Un allegato HTML č stato rimosso...
URL: <http://lists.plone.org/pipermail/plone-plone-it/attachments/20081129/d86bdfdb/attachment.html>


Maggiori informazioni sulla lista Plone-IT