Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Okay people i'm currently using dynamic folders. I can list them fine, Ive done this.

All Products
- Suspension
- - Coilovers
- Wheels wheels
- Engine engine
- Drivetrain
- Braking braking
- Body

Now i'm showing the folders with this.

Code: Select all
<cms:folders>
<div id="links_main_left"> <a href="<cms:show k_folder_link />"><cms:show k_folder_title /></a></div>
</cms:folders>


So the issue i have is that i want to show the

- - Coilovers

under suspension? rather than just listing them all.
So Like what Cheesyproof has done. Where he has listed the main folders, and the sub folders under the main folder.

test.jpg
test.jpg (28.14 KiB) Viewed 1830 times
Hi Simon,

Listing folders has been explained in detail at http://www.couchcms.com/docs/concepts/u ... lders.html.

I'll reiterate the relevant discussion -
By default cms:folders will simply list all folders in the ascending alphabetical order of their names. Their hierarchical positions will not be preserved.
To list the folders in their hierarchical order, set the hierarchical parameter to 1 like this -
Code: Select all
<cms:folders hierarchical='1'>
   <div id="links_main_left"> <a href="<cms:show k_folder_link />"><cms:show k_folder_title /></a></div>
</cms:folders>

To create a UL/LI list (like cheesypoof has done), you can modify the code to become
Code: Select all
<cms:folders hierarchical='1' extended_info='1'>
    <cms:if k_level_start ><UL></cms:if>
    <cms:if k_element_start ><LI>
        <a href="<cms:show k_folder_link />"><cms:show k_folder_title /></a>
    </cms:if>
    <cms:if k_element_end ></LI></cms:if>
    <cms:if k_level_end ></UL></cms:if>
</cms:folders>

Hope this helps.
3 posts Page 1 of 1
cron