[Plone-IT] Show di immagine piccola condizionata

Zardetto Carlo carlo a artmediastudio.com
Lun 26 Set 2011 13:29:34 UTC


<tal:block
   tal:define="our_url context/@@plone_context_state/canonical_object_url;
               home_url context/@@plone_portal_state/portal_url;"
   tal:condition="python:our_url == home_url"> 
<div tal:define="presults python:context.portal_catalog(portal_type='News Item', path='/plone/news', sort_on='effective', sort_order='desc', limit=4, Subject='evidenza')">
                    <div class="novita" tal:repeat="news python: presults[:3]" >
                   
                   <span tal:define="pobj python:news.getObject()">
<h2 class="tileHeadline" id="news_home">
                    <a href="/view" 
                       tal:attributes="href pobj/absolute_url" 
                       tal:content="news/Title">
                        Event headline
                    </a>
                </h2>
<!--
                   <img class="tileImage" tal:replace="structure pobj/image_mini"  />
-->
                   <br />
                   <div tal:replace="structure pobj/CookedBody">This element is a comment.</div>

               </span>
                   <div class="visualClear" ><!-- --></div>

                   </div>
                   </div>
</tal:block>  

Questo  il codice del custom main_template.
Una domanda posso nel main_templet importare architipo image in modo da usare il widget
forse in questo modo riesco a gestire l’ eccezione della non immagine


From: Giacomo Spettoli 
Sent: Monday, September 26, 2011 3:12 PM
To: plone-plone-it a lists.plone.org 
Subject: Re: [Plone-IT] Show di immagine piccola condizionata

On 26/09/2011 13:18, Zardetto Carlo wrote: 
  Purtroppo non  cos

{'container': <PloneSite at /plone>,
 'context': <ATDocument at /plone/front-page>,
 'default': <object object at 0xb75c6538>,
 'here': <ATDocument at /plone/front-page>,
 'loop': {u'news': <Products.PageTemplates.Expressions.PathIterator object at 0x119dc5ec>},
 'nothing': None,
 'options': {'args': ()},
 'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x1192950c>,
 'request': <HTTPRequest, URL=http://www.sito.it/front-page/document_view>,
 'root': <Application at >,
 'template': <FSPageTemplate at /plone/document_view used for /plone/front-page>,
 'traverse_subpath': [],
 'user': <PloneUser 'carlo'>} a.. Module zope.tales.expressions, line 217, in __call__ 
    b.. Module Products.PageTemplates.Expressions, line 153, in _eval 
    c.. Module zope.tales.expressions, line 124, in _eval 
    d.. Module Products.PageTemplates.Expressions, line 80, in boboAwareZopeTraverse 
    e.. Module OFS.Traversable, line 301, in restrictedTraverse 
    f.. Module OFS.Traversable, line 269, in unrestrictedTraverse
    __traceback_info__: ([], 'image_mini') 
  AttributeError: image_mini (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: image_mini) 


   

_______________________________________________
Plone-IT mailing list
Plone-IT a lists.plone.org
https://lists.plone.org/mailman/listinfo/plone-plone-it
http://plone-regional-forums.221720.n2.nabble.com/Plone-Italy-f221721.html
verifica meglio il codice del tuo template (o dacci un pezzo pi completo) perch quel modo  giusto (e verificato).

Giacomo

-- 
Giacomo Spettoli

T: http://twitter.com/giacomospettoli
S: http://careers.stackoverflow.com/giacomospettoli
L: http://linkedin.com/in/giacomospettoli
Company: http://redomino.com
Blog: http://spettoli.com

--------------------------------------------------------------------------------
_______________________________________________
Plone-IT mailing list
Plone-IT a lists.plone.org
https://lists.plone.org/mailman/listinfo/plone-plone-it
http://plone-regional-forums.221720.n2.nabble.com/Plone-Italy-f221721.html
-------------- parte successiva --------------
Un allegato HTML  stato rimosso...
URL: <http://lists.plone.org/pipermail/plone-plone-it/attachments/20110926/18370fcd/attachment.html>


Maggiori informazioni sulla lista Plone-IT