comparison zpt/www/main_template.zpt @ 252:e5b444dab055

add $langroot for absolute urls for switching en<->de
author casties
date Mon, 19 May 2014 11:54:08 +0200
parents a14e462fca1c
children 4eddd388d490 761869998ad0
comparison
equal deleted inserted replaced
251:4742e71606e4 252:e5b444dab055
3 <html xmlns="http://www.w3.org/1999/xhtml" metal:define-macro="page" 3 <html xmlns="http://www.w3.org/1999/xhtml" metal:define-macro="page"
4 tal:define="root here/MPIWGrootURL|here/en/MPIWGrootURL; 4 tal:define="root here/MPIWGrootURL|here/en/MPIWGrootURL;
5 global crumbs template/getBreadcrumbs | nothing; 5 global crumbs template/getBreadcrumbs | nothing;
6 section here/getSection | nothing; 6 section here/getSection | nothing;
7 sections here/getSections | nothing; 7 sections here/getSections | nothing;
8 lang here/getLang | nothing; 8 lang here/getLang | nothing; langroot python:here.getMPIWGRoot().aq_parent.absolute_url();
9 allsecs python:{'en':{ 9 allsecs python:{'en':{
10 'institute':'institute', 10 'institute':'institute',
11 'staff':'staff', 11 'staff':'staff',
12 'research':'research', 12 'research':'research',
13 'resources':'resources', 13 'resources':'resources',
58 58
59 <div id="mainnav"> 59 <div id="mainnav">
60 <ul> 60 <ul>
61 <li tal:repeat="sec sections" tal:attributes="class python:test(sec.getId()==section,'sec on','sec')"><a 61 <li tal:repeat="sec sections" tal:attributes="class python:test(sec.getId()==section,'sec on','sec')"><a
62 tal:attributes="href sec/absolute_url" tal:content="sec/title">Institute</a></li> 62 tal:attributes="href sec/absolute_url" tal:content="sec/title">Institute</a></li>
63 <li class="sec lang" tal:condition="python:lang=='en'"><a class="internal" tal:attributes="href string:$root/../de">Deutsch</a></li> 63 <li class="sec lang" tal:condition="python:lang=='en'"><a class="internal" tal:attributes="href string:$langroot/de/index.html">Deutsch</a></li>
64 <li class="sec lang" tal:condition="python:lang=='de'"><a class="internal" tal:attributes="href string:$root/../en">English</a></li> 64 <li class="sec lang" tal:condition="python:lang=='de'"><a class="internal" tal:attributes="href string:$langroot/en/index.html">English</a></li>
65 </ul> 65 </ul>
66 </div> 66 </div>
67 67
68 <div id="breadcrumbs" metal:define-slot="breadcrumbs"> 68 <div id="breadcrumbs" metal:define-slot="breadcrumbs">
69 <a tal:attributes="href root">Home</a> &gt; 69 <a tal:attributes="href root">Home</a> &gt;