Hi KK,
I have several dynamic folders:
1. Some contain pages and sub-folders which in turn contains pages.

2. Others contain only sub-folders

I want to use conditionals to check if a folder has sub-folders so that I can show them and their pages or and also if it has pages and show the pages in another way in the same folder view.
.I did this but it's only showing the sub folders and it's child pages but not showing the pages that come under the main parent folder.
Code: Select all
<cms:if k_folder_immediate_children>
<cms:folders childof=k_folder_name>
<cms:show k_folder_title />
<cms:pages folder=k_folder_name>
<cms:show k_page_title />
</cms:pages>
</cms:folders>
<cms:else />
<cms:pages folder=k_folder_name>
<cms:show k_page_title />
</cms:pages>
</cms:if>