Category Tree

From TNG_Wiki
Jump to: navigation, search

TNG uses the CategoryTree extension in order to provide an alternate way of organizing information and to provide an index of the categories in the sidebar.

With the MediaWiki 1.25.3 upgrade the 1.23 version of this extension was required in order for it to collapse and expand correctly in the sidebar.

Local Settings

To enable the extension, the following was added to the LocalSettings.php

# CategoryTree extension
$wgUseAjax = true;
$wgCategoryTreeCategoryPageMode = CT_MODE_ALL; # show page and category counts
$wgCategoryTreeSidebarRoot = "Manual"; # add Category:Manual as a tree in sidebar
$wgCategoryTreeSidebarOptions['mode'] = CT_MODE_ALL; # show counts in sidebar
#$wgCategoryTreeSidebarOptions['mode'] = CT_MODE_PAGES; # show counts in sidebar
$wgCategoryTreeForceHeaders = true; # for CategoryTree in sidebar

Font Size Correction

Modified CategoryTreeTag in css to add font-size

.CategoryTreeTag {
    margin-top: 0.5ex;
    margin-bottom: 0.5ex;
    font-size: 9pt;  /* added to reduce font size of CategoryTree in sidebar */