FrontPage 

TB Wiki

Login

Regression Test

Expected HTML for page "Category_Feature"


expected html
nothing
t1This describes an implementation of the Category feature for this wiki.t
2<p>
3<h2><a name="Design">Design</a>
4<span align=right class="section_edit_link">[<a href="/tbwiki/Category_Feature?action=edit&section=Design">edit section</a>]</font></span>
5</h2>
6<ul><li>MacroCategory.py - show a list of pages in a particular category
7<ul><li>implement category tags, like this:
8<pre>
9 {{Category(Tasklist,2023)}}
10 {{Category(New Feature)}}
11</pre>
12</ul>
13</ul>
14<p>
15This set of macros would render a single box at the bottom of the
16page that looked like this:
17<ul><div style="background-color:lightgrey; padding:5px; border-style: solid solid solid solid; border-width: 1px 1px 1px 1px;">
18<pre>Categories: Tasklist|2023|New Feature</pre></div></ul>
19 
20Where each item was a link to a category page for that category of pages.
21And 'Categories' was a link to the <a style="color:red;" href="/tbwiki/Categories">Categories</a> page.
22(ie 'Tasklist' would be a link to <a style="color:red;" href="/tbwiki/Category:Tasklist">Category:Tasklist</a>.)
23If no such page existed, the page is generated on demand using the
24{<b></b>{Category(show:Tasklist)}} macro and some default text.
25<p>
26<ul><li>implement category reference, like this:
27<pre>
28 {{Category(show:Tasklist)}}
29</pre>
30</ul>
31<p>
32This shows the pages in the Tasklist category.
33This could be used inside a specific page: like the <a style="color:red;" href="/tbwiki/Category:Tasklist">Category:Tasklist</a> page,
34after some custom text for that category.
35<p>
36<h2><a name="Implementation_(todo)">Implementation (todo)</a>
37<span align=right class="section_edit_link">[<a href="/tbwiki/Category_Feature?action=edit&section=Implementation_(todo)">edit section</a>]</font></span>
38</h2>
39<ul><li>create MacroCategory.py script
40<li>have main:
41<ul><li>check if it's a 'show' or a tag instance
42<li>if show,
43<ul><li>parse all pages for references to the indicated category tag
44<li>present them as a list (return html with a list of pages)
45</ul><li>if tag,
46<ul><li>scan page and find all categories
47<li>add display at bottom of page
48<ul><li>add to page footer display list
49<ul><li>add code to tbwiki_engine to print lines from page footer display list
50<ul><li>find existing categories line, if any, and and add new tag
51</ul><li>maybe see add_to_msg for inspiration
52</ul></ul><li>substitute category display for one of the macro instantiations
53<ul><li>remove other macro instantiations (do this during page render)
54</ul>
55</ul>
56</ul>
57</ul>
58<p>
59<ul><li>create the "Categories" page
60<li>create a default page for use when a category page is missing
61<li>modify tbwiki_engine.py to convert a reference to a missing category page
62   into the default category page body content (use a macro action for this?)
63</ul>
64<p>
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op

Differences for page "Category_Feature"


expected html
generated html
t No Differences Found t No Differences Found 
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op

Update saved output

Back to diff page

Return to Regression_Test page
TBWiki engine 1.9.3 by Tim Bird