I'm displaying a sidebar (snippet) everywhere on the blog views (folders & pages).
I'm using dynamic folders.
If I'm on a page or in a folder view I would like to check if the current folder k_page_foldername or k_folder_name has child-folders or not. If it is not I would like to display the "sibling folders" instead of the child folders. Is this possible? How do I check for this?
If already tried to setup the logical structure.
I'm using dynamic folders.
If I'm on a page or in a folder view I would like to check if the current folder k_page_foldername or k_folder_name has child-folders or not. If it is not I would like to display the "sibling folders" instead of the child folders. Is this possible? How do I check for this?
If already tried to setup the logical structure.
- Code: Select all
<cms:if k_is_page>
<cms:if k_page_folder has children><!-- how to check for this? -->
<cms:folders masterpage='blog.php' childof=k_page_foldername depth='1' >
<li>
<a href="<cms:show k_folder_link />">
<cms:show k_folder_title />
</a>
</li>
</cms:folders>
<cms:else />
<!-- display sibling folders here (how to do this?) -->
</cms:if>
<cms:else />
<cms:if k_folder has children><!-- how to check for this? -->
<cms:folders masterpage='blog.php' childof=k_folder_name depth='1' >
<li>
<a href="<cms:show k_folder_link />">
<cms:show k_folder_title />
</a>
</li>
</cms:folders>
<cms:else />
<!-- display sibling folders here (how to do this?) -->
</cms:if>
</cms:if />