Once again, Thanks KK for the lead up.
However, here are the codes for the use case scenario here.
1. index page listing
The next lines of code in the Products Template are as follows:
2. Child Folders Listing --->
3. Child Folders Content Pages Listing --->
4. Page Content Details Page --->
Step Nos.1 and 2 works perfectly to list child folders of respective ancestral folder. However, where no child folder exist, the pages contained in the folder was not listed.
Step No.3 doesn't work as I don't think the coding is correct and therefore, step No.4 wasn't reachable.
Is the objective achievable? If so, how?
Thank you.
However, here are the codes for the use case scenario here.
1. index page listing
- Code: Select all
<cms:folders masterpage='products.php' folder_name=k_folder_name root=k_folder_name >
<a href="<cms:show k_folder_link />" class="" >
<div class=" col-box-1 " >
<!--- Displays Grand Parent Folders on Index Page --->
</div>
</a>
</cms:folders>
The next lines of code in the Products Template are as follows:
2. Child Folders Listing --->
- Code: Select all
<cms:if k_is_home || k_is_folder >
<cms:folders masterpage='products.php' hierachial='1' depth='1' childof=k_folder_name >
<a href="<cms:show k_folder_link />" class="" ><cms:show k_folder_title /></a>
<!--- folder has pages and has no sub-folders --->
<cms:if k_page_pagecount && k_folder_immediate_children='0' >
<cms:pages masterpage='products.php' folder=k_folder_name include_subfolders='1' folder_name=k_folder_name root=k_folder_name depth='1' paginate='1' limit='6' >
<a href="<cms:show k_page_link />" class="" ><cms:show k_page_title /></a>
</cms:pages>
<cms:pages masterpage='products.php' folder=k_folder_name include_subfolders='1' folder_name=k_folder_name root=k_folder_name depth='1' paginate='1' limit='6' >
<cms:paginator />
</cms:pages>
</cms:if>
</cms:folders>
3. Child Folders Content Pages Listing --->
- Code: Select all
<cms:if k_is_list && k_is_folder && k_folder_immediate_children='1' >
<cms:pages masterpage='products.php' folder=k_folder_name include_subfolders='1' folder_name=k_folder_name root=k_folder_name depth='1' paginate='1' limit='6' >
<a href="<cms:show k_page_link />" class="" ><cms:show k_page_title /></a>
</cms:pages>
<cms:pages masterpage='products.php' folder=k_folder_name include_subfolders='1' folder_name=k_folder_name root=k_folder_name depth='1' paginate='1' limit='6' >
<cms:paginator />
</cms:pages>
</cms:if>
</cms:folders>
</cms:if >
4. Page Content Details Page --->
- Code: Select all
<cms:else />
<!--- --->
<cms:if k_is_page >
<h1><cms:show k_page_title /></h1>
<cms:parentfolders folder=k_page_foldername depth='1'>
<cms:if k_folder_parentid='-1'>
<a href="<cms:show k_folder_link />" title="Back" class="return" ><span class="return" >» <cms:show k_folder_title /> «</span></a>
</cms:if>
</cms:parentfolders >
<!---- Page Details --->
</cms:if>
</cms:if>
Step Nos.1 and 2 works perfectly to list child folders of respective ancestral folder. However, where no child folder exist, the pages contained in the folder was not listed.
Step No.3 doesn't work as I don't think the coding is correct and therefore, step No.4 wasn't reachable.
Is the objective achievable? If so, how?
Thank you.