Category Feature
Design [edit section]
- MacroCategory.py - show a list of pages in a particular category
- implement category tags, like this:
{{Category(Tasklist,2023)}} {{Category(New Feature)}}
- implement category tags, like this:
This set of macros would render a single box at the bottom of the page that looked like this:
Categories: Tasklist|2023|New Feature
- 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.
Implementation (todo) [edit section]
- 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
- add code to tbwiki_engine to print lines from page footer display list
- add to page footer display list
- 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?)