If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!
cnk_section_tree
This is a section hierarchy / subsection plugin.
Download version 0.3.10: http://www.cnowak.de/works/txp_plugins/cnk_section_tree_v0.3.10.txt
Download compressed 0.3.10: http://www.cnowak.de/works/txp_plugins/cnk_section_tree_v0.3.10_compressed.txt
2009-05-30:
- As of version 0.3.10 the default section will be shown by default when using cnk_breadcrumb and cnk_sec_list. Both tags have an attribute “show_default” which hides the default section when set to “n”
- Users experiencing problems when opening the write tab, may set the CNK_REWRITE_SECTION_DROPDOWN constant to false on the first line of the plugins source code
Note: After you have installed and enabled the plugin, you have to start it’s database install routine on the tab “extensions”->“section_tree”. If you don’t like the plugin, you can always deinstall it on the same page.
Documentation:
Use <txp:cnk_breadcrumb />
to render a breadcrumb menu. Following parameters are accepted by the tag:
param name | description | accepted values / default value |
append_article_title | appends the article title | (‘y’ ; ‘n’ ; default: ‘n’) |
url_pattern | defines the href attribute of section links. %s is the section name, %u is site_root_url | (string ; default depends on txp’s permlink_mode) |
show_default | show default section | (‘y’ ; ‘n’ ; default: ‘y’) |
default_title | defines the name of the default section | (string ; default: home) |
Use <txp:cnk_sec_list />
to render the tree. Following parameters are accepted by the tag:
param name | description | accepted values / default value |
active_section_articles | whether to show article list of active section or not | (‘y’ ; ‘n’ ; default: ‘n’) |
active_section_article_order_by | order article list by | (‘posted’ ; ‘lastmod’ ; ‘title’ ; default: ‘posted’) |
active_section_article_order | order article list direction | (‘asc’ ; ‘desc’ ; default: ‘asc’) |
active_section_article_max_count | limit articles. if set to 0, all articles will be rendered | (integer ; default: 5) |
exclude_sections | comma separated list of section names that should not show up in the tree. subsections of excluded sections won’t show up either | (‘name1’,‘name2’ ; default: ‘’) |
start_section | name of section that should be rendered exclusively. subsections will also be rendered | (string ; default: ‘’) |
css_id | id property of the top-level ul tag | (string ; default: ‘cnk_sec_tree’) |
css_active_section_class | class property of active section element | (string ; default: cnk_active_section) |
css_active_article_class | class property of active article element | (string ; default: cnk_active_article) |
css_article_class | class property of all article elements | (string ; default: cnk_article) |
css_section_class | class property of all section elements | (string ; default: cnk_section) |
css_section_class_open | class property of all opened section elements | (string ; default: cnk_section_open) |
css_section_class_closed | class property of all closed section elements | (string ; default: cnk_section_closed) |
show_article_count | show number of articles with status 4 for every section if at least one article exists. | (‘y’ ; ‘n’ ; default ‘n’) |
show_article_count_bottom | show number of articles with status 4 only for bottom sections if at least one article exists | (‘y’ ; ‘n’ ; default ‘n’) |
exclude_empties | don’t show sections, which have no articles with status 4 assigned to it | (‘y’ ; ‘n’ ; default ‘n’) |
url_pattern_section | defines the href attribute of section links. %s is the section name, %u is site_root_url | (string ; default depends on txp’s permlink_mode) |
url_pattern_article | defines the href attribute of article links. %s is a placeholder for the section name, %a is article id, %t is article url_title, %u is site_root_url, %y(ear), %m(month), %d(ay) | (string ; default depends on txp’s permlink_mode) |
section_append_hmtl | appends string right before the closing li tag of a section. same placeholders as url_pattern_section | (string ; default ‘’) |
article_count_pattern | restyle the article count part of section links. %c is placeholder for article count | (string ; default ‘(%c)’) |
expand_all | Expands all section elements. If set to ‘n’ only the active section and its parents will be expanded. (like a file-tree) | (‘y’ ; ‘n’ ; default ‘y’) |
show_default | show default section | (‘y’ ; ‘n’ ; default: ‘y’) |
default_title | defines the name of the default section | (string ; default: home) |
Compatibility tested with:
plugin name | version | |
sed_section_fields | 0.2.112 | OK |
Additional notes:
The section tree has to be configured in the section tab by simply selecting a parent section for each section.
Currently the plugin does not allow to simply change the order of subsections. (If you want to sort them, just add them to their parents in the order you would like to display them.)
Friendly urls will come in one of the next versions. I’m in contact with Graeme to get his permanent links plugin to work with mine.
This is how it looks like so far:
In the backend section tab there is a dropdown to select parent sections:
The section dropdown in the write view is also replaced by a tree dropdown: