Mercurial > hg > MPIWGWeb
view zpt/www/common_template.zpt @ 31:b12d80f033fb
fix feature story number (one-based now).
author | casties |
---|---|
date | Tue, 23 Apr 2013 18:22:27 +0200 |
parents | 8a99ad8713d6 |
children | ab836d3f96dc |
line wrap: on
line source
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <!-- common template snippets as METAL macros --> <!-- full-row feature block --> <div class="row teaser" metal:define-macro="feature_teaser" tal:define="features python:here.getFeatures(); feature_num python:int(request.get('ff',len(features))); feature python:features[feature_num-1]; feature_url python:feature.getUrl('%s/%s/features'%(root,secmap['news'])); teaser_path string:here/features/${feature/getTeaserPath};"> <!-- feature image and intro --> <div class="col"> <div class="box teaser_image"> <div class="slider prev" tal:condition="python:feature_num>1"> <a tal:attributes="href python:'?ff=%s'%(feature_num-1)"><img tal:attributes="src string:$root/images/slider_prev.png" alt="previous" /></a> </div> <a tal:attributes="href feature_url"> <img tal:attributes="src feature/getFrontpageImgUrl" width="593" height="351" /> </a> <tal:block tal:condition="exists:python:path(teaser_path+'/macros/caption')"> <tal:block metal:use-macro="python:path(teaser_path+'/macros/caption')" /> </tal:block> </div> </div> <div class="col"> <div class="box teaser_text"> <div class="feature_number" tal:content="feature_num|nothing" /> <div class="date" tal:content="feature/getDateString" /> <h3> <metal:block metal:define-slot="topic_title">Current Research Topic</metal:block> </h3> <tal:block tal:condition="exists:python:path(teaser_path+'/macros/text')"> <tal:block tal:condition="exists:python:path(teaser_path+'/macros/text')" metal:use-macro="python:path(teaser_path+'/macros/text')" /> </tal:block> <p> <a class="internal" tal:attributes="href feature_url"><metal:block metal:define-slot="topic_link">Current Research Topic</metal:block></a> </p> <p> <a class="internal" tal:attributes="href string:$root/${secmap/news}/featurearchive.html"><metal:block metal:define-slot="topic_archive">Research Topic Archive</metal:block></a> </p> <div class="slider next" tal:condition="python:feature_num<len(features)-1"> <a tal:attributes="href python:'?ff=%s'%(feature_num+1)"><img tal:attributes="src string:$root/images/slider_next.png" alt="next" /></a> </div> </div> </div> </div> <!-- feature --> </body> </html>