FrontPage 

TB Wiki

Login

Regression Test

Expected HTML for page "DocMarkupVariables"


expected html
nothing
t1As part of markup processing TBWiki expands markup variablest
2in the markup text.
3<p>
4This is done using a python string replacement, and the functionality
5is provided by the "data_class" class.
6<p>
7These are mostly used in themes and by system code.
8<p>
9<h2><a name="How_to_reference">How to reference</a>
10<span align=right class="section_edit_link">[<a href="/tbwiki/DocMarkupVariables?action=edit&section=How_to_reference">edit section</a>]</font></span>
11</h2>
12The markup on a page can reference these variables, by putting
13a python named-string macro in the markup.
14<p>
15For example, to reference the 'asctime' value, the page should
16have the following markup:
17<p>
18The time is: %(asctime)s
19<p>
20With the resulting text being:
21<p>
22The time is Fri Jun  5 15:04:42 2026
23<p>
24These can be used in the header and footer pages for a theme, and
25are placed inline with the HTML markup.
26<p>
27<h2><a name="Variables">Variables</a>
28<span align=right class="section_edit_link">[<a href="/tbwiki/DocMarkupVariables?action=edit&section=Variables">edit section</a>]</font></span>
29</h2>
30Here is a list of variables and their common usage:
31<ul><li><b>asctime</b>
32<ul><li>shows the current date and time
33</ul><li><b>timestamp</b>
34<ul><li>shows the current date and time, in the format of a single string
35</ul><li><b>login_form</b>
36<ul><li>shows a login form
37</ul><li><b>login_form_nobr</b>
38<ul><li>shows a login form on a single line
39</ul><li><b>nav_box_sidebar</b>
40<ul><li>shows the navigation box as a left sidebar box
41</ul><li><b>nav_bar_bar</b>
42<ul><li>shows the navigation links in a single line
43</ul><li><b>search_form</b>
44<ul><li>search form in a box
45</ul><li><b>search_form_nobr</b>
46<ul><li>search form on a single line
47</ul><li><b>toolbox</b>
48<ul><li>toolbox in a box (usually has 'What links here', etc.)
49</ul><li><b>action_bar</b>
50<ul><li>this is the set of tabs across the top of the page with different actions that can be performed on the page (usually links to 'article', 'discussion', 'edits this page', and 'history')
51</ul><li><b>trail_bar</b>
52<ul><li>this is a row of links to the most recently visited pages on this wiki
53</ul><li><b>message</b>
54<ul><li>this shows any message printed with this page
55</ul><li><b>content_type</b>
56<ul><li>value for the content/type header (usually text/html)
57</ul><li><b>cookies</b>
58<ul><li>the string values for any cookies to return to the user
59</ul><li><b>title</b>
60<ul><li>the title of the page
61</ul><li><b>site_title</b>
62<ul><li>the title of the wiki site
63</ul><li><b>base_url</b>
64<ul><li>the URL for the wiki base
65</ul><li><b>base_css_url</b>
66<ul><li>the URL for where the css file is located
67</ul><li><b>stylesheet</b>
68<ul><li>the name of the css file
69</ul><li><b>body_attrs</b>
70<ul><li>the attributes to put in the body tag for the page (this can be used to show different background colors, etc.)
71</ul><li><b>page_url</b>
72<ul><li>the URL for the current page
73</ul><li><b>user_name</b>
74<ul><li>the name of the current logged-in user
75</ul><li><b>user_id</b>
76<ul><li>the id of the current logged-in user
77</ul><li><b>user_admin</b>
78<ul><li>the admin status (either 1 or 0) of the current logged-in user
79</ul><li><b>theme</b>
80<ul><li>the name of the theme currently in use
81</ul><li><b>version</b>
82<ul><li>the version of the tbwiki core engine
83</ul><li><b>git_commit</b>
84<ul><li>the git hash for the current version of the tbwiki engine
85</ul><li><b>git_describe</b>
86<ul><li>the "git describe" string for the current version of the tbwiki engine
87</ul>
88</ul>
89<p>
90<h2><a name="Configurable_items">Configurable items</a>
91<span align=right class="section_edit_link">[<a href="/tbwiki/DocMarkupVariables?action=edit&section=Configurable_items">edit section</a>]</font></span>
92</h2>
93Note that many of these items come directly from variables defined in the
94wiki instance configuration.  See <a href="/tbwiki/DocConfiguration">DocConfiguration</a> for more information.
95<p>
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op

Differences for page "DocMarkupVariables"


expected html
generated html
19<p>19<p>
20With the resulting text being:20With the resulting text being:
21<p>21<p>
t22The time is Fri Jun  5 15:04:42 2026t22The time is Fri Jun  5 17:05:44 2026
23<p>23<p>
24These can be used in the header and footer pages for a theme, and24These can be used in the header and footer pages for a theme, and
25are placed inline with the HTML markup.25are placed inline with the HTML markup.
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