changeset 252:e5b444dab055

add $langroot for absolute urls for switching en<->de
author casties
date Mon, 19 May 2014 11:54:08 +0200
parents 4742e71606e4
children c15138774864
files zpt/www/main_template.zpt
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/zpt/www/main_template.zpt	Wed May 07 15:01:41 2014 +0200
+++ b/zpt/www/main_template.zpt	Mon May 19 11:54:08 2014 +0200
@@ -5,7 +5,7 @@
                   global crumbs template/getBreadcrumbs | nothing;
                   section here/getSection | nothing;
                   sections here/getSections | nothing;
-                  lang here/getLang | nothing;
+                  lang here/getLang | nothing; langroot python:here.getMPIWGRoot().aq_parent.absolute_url();
                   allsecs python:{'en':{
                     'institute':'institute',
                     'staff':'staff',
@@ -60,8 +60,8 @@
       <ul>
         <li tal:repeat="sec sections" tal:attributes="class python:test(sec.getId()==section,'sec on','sec')"><a
           tal:attributes="href sec/absolute_url" tal:content="sec/title">Institute</a></li>
-        <li class="sec lang" tal:condition="python:lang=='en'"><a class="internal" tal:attributes="href string:$root/../de">Deutsch</a></li>
-        <li class="sec lang" tal:condition="python:lang=='de'"><a class="internal" tal:attributes="href string:$root/../en">English</a></li>
+        <li class="sec lang" tal:condition="python:lang=='en'"><a class="internal" tal:attributes="href string:$langroot/de/index.html">Deutsch</a></li>
+        <li class="sec lang" tal:condition="python:lang=='de'"><a class="internal" tal:attributes="href string:$langroot/en/index.html">English</a></li>
       </ul>
     </div>