Mercurial > hg > MPIWGThesaurus
view zpt/Copy of levelFormatted.zpt @ 39:4342a81e0aa0
make getTagsAsHash not return empty lists.
author | casties |
---|---|
date | Tue, 29 Oct 2013 18:19:29 +0100 |
parents | 30dee40ff84b |
children |
line wrap: on
line source
<!-- exmample for level template --> <div class="level1" tal:repeat="level1 python:options['level1_entries']"> <span class="showApproach" tal:content="python:here.getTitle(level1) +'('+ str(len(here.getProjectsWithTag(options['type'],here.getTitle(level1)))) +')' ">Lorem</span> <div class="projectsWindow"> <div class="level1_projects" tal:repeat="proj python:here.getProjectsWithTag(options['type'],here.getTitle(level1))"><a tal:attributes="href python:proj[0]"><span tal:content="python:proj[1]">my proj</span></a><tal:x define="person python:proj[2]"><span class="person_projects" tal:content="person"/></tal:x></div> </div> <tal:y condition="python:len(here.getEntries(level1))>0"> <div class="level2" tal:repeat="level2 python:here.getEntries(level1)"> <tal:x define="subitems python:here.getProjectsWithTag(options['type'],here.getTitle(level1)+'_'+here.getTitle(level2))" condition="python:len(subitems)>0"> <span class="showApproach" tal:content="python:here.getTitle(level2) +' ('+str(len(subitems))+')'">Lor</span> <div class="projectsWindow"> <div class="level2_projects" tal:repeat="proj python:subitems"> <a tal:attributes="href python:proj[0]"><span tal:content="python:proj[1]">my proj</span></a> <tal:x define="person python:proj[2]"><span class="person_projects" tal:content="person"/></tal:x></div> </div> </tal:x> </div> </tal:y> </div>