Changeset 3846


Ignore:
Timestamp:
Aug 28, 2012, 9:52:06 AM (14 years ago)
Author:
casties
Message:

fix bug when metadata is missing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zpt/thumbListMD.zpt

    r27 r3846  
    3232                <div class="thumblist" tal:define="colRows python:here.getColTimesRow(showall=showall)">
    3333                                <div class="thumb" tal:repeat="th python:here.getThumbList(colRows,filename=filename,group=group)">
    34                                  <a tal:attributes="id python:th[0];
     34                                 <a tal:define="key python:th[0].split('.')[0]" tal:attributes="id python:th[0];
    3535                                                                        href python:here.REQUEST['URL1']+here.generateParams({'filename':th[0],'showall':showall,'generic':generic,'group':group})"
    3636                                                                        target="_top">
    37                                                 <div class="image" tal:content="structure python:th[1].thumbMD(metadataRecord=md.get(th[0].split('.')[0],None))">thumb</div>
     37                                                <div class="image" tal:condition="python:key in md" tal:content="structure python:th[1].thumbMD(metadataRecord=md.get(th[0].split('.')[0],None))">thumb</div>
     38                            <div class="image" tal:condition="python:key not in md" tal:content="structure python:th[1].thumb()">thumb</div>
    3839                                                        <span tal:replace="structure python:th[1].title"/>
    3940                                 </a>
Note: See TracChangeset for help on using the changeset viewer.