Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi Forum, I hope someone will be able to help me on this, I sit for hours and have no clue.

I want to implement multilingual menu with 3 languages as described in this post
http://www.couchcms.com/forum/viewtopic.php?f=2&t=9078&p=18785&hilit=multilanguage#p18785

I have no idea, what I am doing wrong, because I do not get my_link variables set or fetched on all three pages.
I work with already existing, non clonable pages. When I added editable regions of the type relations, in the drop down menu appears "default page for de/xxxxx.php *PLEASE CHANGE THIS*", for the primary page....but I see no way to change that . In the case, that this is not the problem, I provide the Code below....

I followed the above mentioned post but I cannot find the error.

Code in the "primary" template is not changed, here referred as DE page.
Code added in template 1:
Code: Select all
    <!--related DE page -->
<cms:editable type='relation' name='alert_de_en_sh' label='Related DE Page' masterpage='de/xxxxxxxx.php' has='one' reverse_has='one' />


Code in template 2:
Code: Select all
      <!--related DE page -->
  <cms:editable type='relation' name='alert_de_en_sh' label='Related DE Page' masterpage='de/xxxxxxx.php' has='one' reverse_has='one' />


Code in the snippet that is named 'lang_links_news.html' in the example KK provided:
Code: Select all
<cms:if k_template_name='de/xxxxxxx.php'>   
<cms:set my_link_de=k_page_link 'global' />
   
    <cms:reverse_related_pages 'alert_de_en_sh' masterpage='en/xxxxxxx.php' limit='1'>
        <cms:set my_link_en=k_page_link 'global' />
    </cms:reverse_related_pages>

    <cms:reverse_related_pages 'alert_de_en_sh' masterpage='sh/xxxxxxx.php' limit='1'>
        <cms:set my_link_sh=k_page_link 'global' />
    </cms:reverse_related_pages>
       
<cms:else/>

<!-- for other templates first get the related DE page -->
<cms:related_pages 'alert_de_en_sh' limit='1' >
   
    <cms:set my_link_de=k_page_link 'global' />

    <cms:reverse_related_pages 'alert_de_en_sh' masterpage='sh/xxxxxxx.php' limit='1'>
        <cms:set my_link_sh=k_page_link 'global' />
    </cms:reverse_related_pages>

    <cms:reverse_related_pages 'alert_de_en_sh' masterpage='sh/xxxxxxx.php' limit='1'>
        <cms:set my_link_sh=k_page_link 'global' />
    </cms:reverse_related_pages>
   
</cms:related_pages> 
</cms:if> 


And the snippet with links:
Code: Select all
     <ul class="inline-list right">
   <li class="inline-li-label">
        <cms:if k_template_name='de/xxxxxxx.php'>Sprache:</cms:if>
         <cms:if k_template_name='en/xxxxxxx.php'>Language:</cms:if>
         <cms:if k_template_name='sh/xxxxxxx.php'>Izaberite jezik:</cms:if>
         </li>
         <li><a href="<cms:show my_link_de/>" >de</a></li>
        <li><a href="<cms:show my_link_en/>" >en</a></li>
<li><a href="<cms:show my_link_sh/>" >sh</a></li>
   
</ul>


Both snippets embedded as they should be in all three templates...

Thanks in advance!!


Tanja
I work with already existing, non clonable pages. When I added editable regions of the type relations, in the drop down menu appears "default page for de/xxxxx.php *PLEASE CHANGE THIS*", for the primary page....but I see no way to change that .


Didn't read the rest yet, but this stole my attention :)
I am sure, you'd want that name changed. Make the template clonable, then rename the default page title/name to something more suitable. Then make your template non-clonable again and you'll be good!
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Hi Trendoman,
I think I won't do that, as the pages are already in a live website, and all the content in editable regions will be deleted that way...

In a meantime I figured out that default template name is not the issue.
I have created test non clonable pages, with default title not making a problem. On the first, "primary" relation page, all is working fine, on the "second" just first two variables are catches (my_link_de and my_link_en) , and in the third only the first variable (my_link_de) is catches....

hmmm...
best regards

Tanja
3 posts Page 1 of 1