Category:Features|Blog 

TB Wiki

Login

Feature:Category in split format

This describes an implementation of the Category feature for this wiki.
This describes an implementation of the Category feature for this wiki.

Design [edit section]

{{{ { {Category(Tasklist,2023)}} { {Category(New Feature)}}}}}
== Design == * MacroCategory.py - show a list of pages in a particular category   * implement category tags, like this:{{{ { {Category(Tasklist,2023)}} { {Category(New Feature)}}}}}
This set of macros would render a single box at the bottom of thepage that looked like this:{{{#!YellowBoxcolor=lightgreyCategories: Tasklist|2023|New Feature}}}Where each item was a link to a category page for that category of pages.And 'Categories' was a link to the Categories page.(ie 'Tasklist' would be a link to Category:Tasklist.)If no such page existed, the page is generated on demand using the{{Category(show:Tasklist)}} macro and some default text.
This set of macros would render a single box at the bottom of thepage that looked like this:{{{#!YellowBoxcolor=lightgreyCategories: Tasklist|2023|New Feature}}}Where each item was a link to a category page for that category of pages.And 'Categories' was a link to the [[Categories]] page.(ie 'Tasklist' would be a link to [[Category:Tasklist]].)If no such page existed, the page is generated on demand using the{''''''{Category(show:Tasklist)}} macro and some default text.
  • implement category reference, like this:{{{ { {Category(show:Tasklist)}}}}}
   * implement category reference, like this:{{{ { {Category(show:Tasklist)}}}}}
This shows the pages in the Tasklist category.This could be used inside a specific page: like the Category:Tasklist page,after some custom text for that category.
This shows the pages in the Tasklist category.This could be used inside a specific page: like the [[Category:Tasklist]] page,after some custom text for that category.

Implementation (done) [edit section]

== Implementation (done) == * create MacroCategory.py script * have main:   - check if it's a 'show' or a tag instance   - if show,      * parse all pages for references to the indicated category tag      * present them as a list (return html with a list of pages)   - if tag,      * scan page and find all categories      * add display at bottom of page        * add to page footer display list          * add code to tbwiki_engine to print lines from page footer display list            * find existing categories line, if any, and and add new tag          * maybe see add_to_msg for inspiration      * substitute category display for one of the macro instantiations        * remove other macro instantiations (do this during page render)
  • create the "Categories" page * create a default page for use when a category page is missing * modify tbwiki_engine.py to convert a reference to a missing category page into the default category page body content (use a macro action for this?)
 * create the "Categories" page * create a default page for use when a category page is missing * modify tbwiki_engine.py to convert a reference to a missing category page   into the default category page body content (use a macro action for this?)
This feature is complete, as of 2026-09-12
This feature is complete, as of 2026-09-12

----{{Category(Features)}}
Categories: Features
TBWiki engine 2.0.1 by Tim Bird