by
KK » Wed Dec 09, 2015 1:20 am
@trendoman
@KK, what is the logic behind duplication of page names wiht extended_info='1'?
I think you'll find that easier to understand with cms:folders where we make use of 'extended_info' to create UL/LI menu -
- Code: Select all
<cms:folders masterpage='news.php' childof='world' hierarchical='1' extended_info='1'>
<cms:if k_level_start ><UL></cms:if>
<cms:if k_element_start ><LI>
<cms:show k_folder_title />
</cms:if>
<cms:if k_element_end ></LI></cms:if>
<cms:if k_level_end ></UL></cms:if>
</cms:folders>
The code above would result in outputting something like the following -
- Code: Select all
<ul>
<li>
Asian News
<ul>
<li>China News</li>
<li>Japan News</li>
</ul>
</li>
<li>
North American News
<ul>
<li>
United States News
<ul>
<li>Nevada News</li>
<li>Ohio News</li>
</ul>
</li>
</ul>
</li>
</ul>
As you can see, with this setting the cms:folders tag does not simply iterate through the folders sequentially - rather it also reports the changes in 'levels' (reflecting the hierarchy of the folders as it goes through them). This makes it easy to output the <LI> and <UL>s.
Exactly the same thing applies to cms:nested_pages as well.
Does this explanation makes things any clearer? Please let me know.
Also spotted a bug (1.4.7). If I select a page with checkbox, then hit 'Delete selected' button - page is not deleted
Yup. It is a known bug and was present in 1.4.5 too. Has been rectified for the next version.
Also, how to predict the output order of nested pages, while using normal <cms:pages> tag?
cms:pages, by default, uses the publish_date for sorting. Other valid values are given in the documentation -
http://docs.couchcms.com/tags-reference ... ml#orderby