Ignore:
Timestamp:
5 Apr 2013, 06:19:55 (12 years ago)
Author:
Henrik Bettermann
Message:

Do it in a different way.

Location:
main/waeup.ngrentheme/trunk/waeup/ngrentheme/browser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ngrentheme/trunk/waeup/ngrentheme/browser/templates/footer.pt

    r10049 r10058  
    11<div metal:define-macro="portal_footer"
    22     i18n:domain="plone"
    3      class="row">
    4     <div class="">
    5         <div id="portal-footer"><br /><br />
    6         Footer not yet configured<br /><br /><br />
    7         </div>
     3     class="row"
     4     tal:define="footer python:getattr(view.portal_state.portal(), 'footer', None)">
     5
     6    <div id="portal-footer">
     7      <br /><br />
     8      <div tal:condition="python:footer is not None">
     9        <span tal:replace="structure python:footer.getText()"></span>
     10      </div>
     11      <div tal:condition="python:footer is None">
     12        Footer not yet configured<br />
     13      </div>
     14      <br /><br />
    815    </div>
    916</div>
  • main/waeup.ngrentheme/trunk/waeup/ngrentheme/browser/viewlets.py

    r10057 r10058  
    2525class WAeUPFooterViewlet(FooterViewlet):
    2626    index = ViewPageTemplateFile('templates/footer.pt')
    27 
    28     def render(self):
    29         footer = getattr(self.portal_state.portal(), 'footer', None)
    30         if footer is None:
    31             return self.index()
    32         footer_text = footer.getText()
    33         return  u"""
    34 <div class="cell width-full position-0">
    35   <div id="portal-footer">
    36     %s
    37   </div>
    38 </div>""" % footer_text
    39    
Note: See TracChangeset for help on using the changeset viewer.