Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
Hi All,
I'm trying to figure that out but no luck. I want to create an dropdown list in back end from were links can be set to all pages. I'm using the multi lang addon.
https://www.couchcms.com/forum/viewtopic.php?f=5&t=10979

The idea is to iterate trough the folders and pages with "<cms:each ...." but i having troubles to get the link right. Is it possible anyhow? And if yes, how can it be done? This is also quite interesting because a sitemap creation should work quite similar.

here my code so far
Code: Select all
<cms:templates show_hidden='0' order='asc'>
    <cms:if (k_template_name eq 'index.php') ||
            (k_template_name eq 'projekte.php') ||
            (k_template_name eq 'kontakt.php')||
            (k_template_name eq 'impressum.php') ||
            (k_template_name eq 'material.php') ||
            (k_template_name eq 'referenzen.php') >
   
    <cms:if (k_template_name eq 'projekte.php') >
   
    <cms:folders masterpage="projekte.php">
    <cms:each k_supported_langs as='lang' key='lc'>
    |<cms:show lc />:<cms:show k_template_title /> <cms:show k_folder_title  />=<cms:if "<cms:show lc />"='de'/><cms:show k_link_de/></cms:if><cms:if "<cms:show lc />"='en'/><cms:show k_link_en/></cms:if><cms:if "<cms:show lc />"='ru'/><cms:show k_link_ru/></cms:if>
    </cms:each>
    </cms:folders>
   
    </cms:if>
   
    <cms:pages masterpage=k_template_name>
    <cms:each k_supported_langs as='lang' key='lc'>   
    <cms:show lc />:<cms:show k_template_title /> <cms:show k_page_title />=<cms:show_with_lc k_page_link/> thats not working|
    </cms:each>   
    </cms:pages>
    </cms:if>
   
</cms:templates>


Thank you very much!
So if the above isn't possible, how did you guys set internal links? All by hand? And how do you create a sitemap for google with the multilingual addon?

I came up with the code below, but thats no solution as the template_title may have capital letters and the full link is only working in special cases
Code: Select all
<cms:pages masterpage=k_template_name>
    <cms:each k_supported_langs as='lang' key='lc'>
    <cms:set lang= "<cms:show lc />"/>   
    <cms:show lc />:<cms:show k_template_title /> <cms:show k_page_title />=<cms:if lang='en'><cms:show k_site_link/> <cms:show lc/>/<cms:show k_template_title/>/<cms:show k_page_foldername/>/<cms:show k_page_name/>.html </cms:if>|
    </cms:each>   
    </cms:pages>
2 posts Page 1 of 1

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 5 guests