Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hi Couch community,
after days of searching and reading the documentation and this forum, trying and failing, I am unable to make the multi-language addon work together with the extended-folders addon...

Basically what I am trying to create is a menu from dynamic folders, in 2 or more languages, with extended-folders. The problem I am having is that <cms:show k_folder_title /> in the menu is showing the static name, but <cms:get "title_<cms:show k_lang />" /> is only getting the current folder name, not the extended field "title_nl" or "title_en" of each individual folder. What is the right tag to use here?

The template: machines.php
Code: Select all
<cms:template title='Verpakkingsmachines' clonable='1' dynamic_folders='1' folder_masterpage='machines-folders.php'>
    <cms:each k_supported_langs as='lang' key='lc'>
        <cms:editable type='group' name="group_<cms:show lc />" label=lang order=k_count  order='1'>
            <cms:editable type='text' name="title_<cms:show lc />" label='Title' required='1'/>
            <cms:editable type='richtext' name="shorttext_<cms:show lc />" label='Short text' toolbar='custom' custom_toolbar="bold, italic | format | undo, redo | cut, copy, pastetext, pastefromword | link, unlink | justifyleft, justifycenter, justifyright, justifyblock | numberedlist, bulletedlist | source" />
            <cms:editable type='richtext' name="longtext_<cms:show lc />" label='Long text' toolbar='custom' custom_toolbar="bold, italic | format | undo, redo | cut, copy, pastetext, pastefromword | link, unlink | justifyleft, justifycenter, justifyright, justifyblock | numberedlist, bulletedlist | source" />
            <cms:editable type='richtext' name="brochure_<cms:show lc />" label='Brochure text' toolbar='custom' custom_toolbar="bold, italic | format | undo, redo | cut, copy, pastetext, pastefromword | link, unlink | justifyleft, justifycenter, justifyright, justifyblock | numberedlist, bulletedlist | source" />
        </cms:editable>
    </cms:each>
   
    <cms:repeatable name='my_gallery' label='Gallery'  order='2'>
        <cms:editable name='my_image' type='image' show_preview='1' preview_width='150' />
    </cms:repeatable>   

    <cms:editable name='brochure' label='Brochure bestand' desc='Upload the file here' type='file'  order='3' /> 
</cms:template>


Extended folders addon: machines-folders.php
Code: Select all
<cms:template title='Machine Folders' clonable='1' hidden='1'>
    <cms:each k_supported_langs as='lang' key='lc'>
        <cms:editable type='group' name="group_<cms:show lc />" label=lang order=k_count  order='1'>
            <cms:editable type='text' name="title_<cms:show lc />" label='Title' required='1'/>
            <cms:editable type='richtext' name="description_<cms:show lc />" label='Description' toolbar='custom' custom_toolbar="bold, italic | format | undo, redo | cut, copy, pastetext, pastefromword | link, unlink | justifyleft, justifycenter, justifyright, justifyblock | numberedlist, bulletedlist | source" />
        </cms:editable>
    </cms:each>

    <cms:repeatable name='my_gallery' label='Gallery'  order='2'>
        <cms:editable name='my_image' type='image' show_preview='1' preview_width='150' />
    </cms:repeatable>   

<cms:editable name='my_css' type='message'>
    <style type="text/css">
        #k_element_k_k_desc, #k_element_k_image {
            display: none !important;
        } 
    </style>
</cms:editable>
</cms:template>


The main menu on all pages:
Code: Select all
<div id="machinesubmenu">
      <cms:folders masterpage="machines.php" orderby="weight" depth="1"><ul>
      <li><label for="dropmachine" class="machinelabel"><cms:show k_folder_title /></label></li>
      <cms:folders masterpage="machines.php" orderby="weight" childof=k_folder_name >
      <li><a href="<cms:show_with_lc k_folder_link />"><cms:show k_folder_title /></a></li>
      </cms:folders>
      </ul></cms:folders>
      </div>

Thanks a million in advance.

Attachments

You are not too happy about wasted days, @graphicsco? Pay for support.

graphicsco wrote: Hi Couch community,
after days of searching and reading the documentation and this forum, trying and failing, I am unable to make the multi-language addon work together with the extended-folders addon...
...
Thanks a million in advance.

It could be a perfect question for getting Stack Rep... Anyway, I'll reply here:

<cms:folders masterpage="machines.php" orderby="weight" depth="1" include_custom_fields='1'> ..


Every <cms:folders> need above parameter to actually show values. Is this issue easy to find? Yes, one minute. You employ variable dump and review what's being said there. Using your original code -

Code: Select all
<cms:folders masterpage="machines.php" orderby="weight" depth="1" >
    <cms:test ignore='0'><cms:dump_all /></cms:test>
</cms:folders>


It says k_include_custom_fields='0' and variables title_%lc% are empty. Add parameter and it is fixed.
I was actually only letting people know I've put in some effort to try and figure it out myself. Not sure why you being so hostile???

Every <cms:folders> need above parameter to actually show values. Is this issue easy to find? Yes, one minute.
This is not mentioned anywhere. Definitely not here or here or here?

Adding include_custom_fields='1' to the second <cms:folders childof=k_folder_name> got <cms:get "title_<cms:show k_lang />" /> working now!
Yeah, my help helps :)

Your posted links are useless, because they are not from 'extended-folders' documentation which cleary says this

Screenshot-2023-03-08-221007.885.png
Screenshot-2023-03-08-221007.885.png (20.78 KiB) Viewed 2159 times


I am not hostile at all :) You are dead wrong on this. :lol:

graphicsco wrote: I was actually only letting people know I've put in some effort to try and figure it out myself. Not sure why you being so hostile???

Every <cms:folders> need above parameter to actually show values. Is this issue easy to find? Yes, one minute.
This is not mentioned anywhere. Definitely not here or here or here?

Adding include_custom_fields='1' to the second <cms:folders childof=k_folder_name> got <cms:get "title_<cms:show k_lang />" /> working now!
4 posts Page 1 of 1
cron