FrontPage 

TB Wiki

Login

Regression Test

Expected HTML for page "DocBlocks"


expected html
nothing
t1A block in tbwiki is marked on a page with opening and closing triple-braces.t
2<p>
3The syntax of the first word on the same line as the opening braces determines
4the type of block, and how it will be interpreted by tbwiki.
5<p>
6Here are some block types:
7<ul><li>preformatted text - use triple braces, and no name
8<li>named block - use triple braces and a name on the top line
9<li>hidden block - use triple braces and a leading '#' in the name
10<ul><li>this can also be called a "comment block"
11</ul><li>processor block - put the processor name after #! on the top line
12</ul>
13<p>
14<h2><a name="Block_names">Block names</a>
15<span align=right class="section_edit_link">[<a href="/tbwiki/DocBlocks?action=edit&section=Block_names">edit section</a>]</font></span>
16</h2>
17A block can be named, in which case a single word immediately following the
18opening triple-brace, on the same line, is the block name.
19Blocks may be referenced by name from other pages or using processors.
20<p>
21Block names are referenced with the syntax:
22<p>
23<ul><div style="background-color:#ffffe0; padding:5px; border-style: solid solid solid solid; border-width: 1px 1px 1px 1px;">
24<pre>pageName:blockName</pre></div></ul>
25 
26<p>
27If the block is on the same page as the processor that is working on it,
28the page name may be omitted, leaving just the leading colon.
29<p>
30To declare a block name, use the following:
31<ul><li>simple name: By default, the first word on the same line as the opening triple braces
32<li>processor named block: you can put the name of a block after the processor invocation line, using a colon (':') to separate them.
33<ul><li>for example: #!Table:q1_data - the block name would be 'q1_data'
34</ul><li>by block number: a number is generated for each block while the page is being parsed.  If there is no name given by the block itself, it will be assigned one consisting of '__blockn', where n is the number of the block on the page (starting with __block1 being the first block on the page.
35<ul><li>It is unwise to use block numbers for static references (that is, references from one page to another where the number is in the wiki text).  This is because as someone changes the text (adds another block to a page), the number calculated by tbwiki will change - making the old number obsolete.
36<li>The purpose of numbered blocks is to support dynamic pages (processors with sub-actions) so they can retrieve the block information outside of normal page context.  Note that this may still result in concurrency problems.
37</ul>
38</ul>
39<p>
40<h2><a name="examples">examples</a>
41<span align=right class="section_edit_link">[<a href="/tbwiki/DocBlocks?action=edit&section=examples">edit section</a>]</font></span>
42</h2>
43simple named block
44<pre>
45{{{MyData
46&lt;put data here&gt;
47}} }
48</pre>
49<p>
50hidden block
51<pre>
52{{{#HyHiddenData
53&lt;this data won't display on the page&gt;
54}} }
55</pre>
56<p>
57processor
58<pre>
59{{{#!PigLatin
60This will display as pig latin!
61}} }
62</pre>
63<p>
64named table block
65<pre>
66{{{#!Table:BlockName
67&lt;table spec and data&gt;
68}} }
69</pre>
70<p>
71unnamed table block
72<pre>
73{{{#!Table
74}} }
75</pre>
76Internally, the table code may use a table name of __block5 for that table.
77<p>
78See <a style="color:red;" href="/tbwiki/TestBlocks">TestBlocks</a> for more examples.
79<p>
80<h2><a name="Limitations">Limitations</a>
81<span align=right class="section_edit_link">[<a href="/tbwiki/DocBlocks?action=edit&section=Limitations">edit section</a>]</font></span>
82</h2>
83Block declarations in tbwiki markup have the following limitations:
84<p>
85<ul><li>You can not start a block in the middle of a line.  The {{{ needs to be
86at the start of a line.
87</ul>
88<p>
89<ul><li>You can end a block in the middle of a line, but currently the code truncates the value of the block to exclude content on the same line as the closing braces
90</ul>
91<p>
92<ul><li>Simple named blocks (blocks with a name but not a processor) always show the block name.
93<ul><li>Tbwiki should support a dot-prefixed name for blocks where the name is hidden
94</ul>
95</ul>
96<p>
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op

Differences for page "DocBlocks"


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