/
RenderApplicationDocumentation.txt
55 lines (48 loc) · 2.04 KB
/
RenderApplicationDocumentation.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
%META:TOPICINFO{author="ProjectContributor" comment="autosave" date="1356278736" format="1.1" version="6"}%
%META:TOPICPARENT{name="TopicFunction"}%
---++ Documentation
%STARTSECTION{"documentation"}%
---+++++ Parameters
* NAME: application name, defaults to BASEWEB
* THEWEB: web to search for docu, defaults to BASEWEB
* TYPE: extract documentation of topics of the given type
* NOTTYPE: don't list topics of that type
---+++++ Css
* twbDocuHolder
* twbDocuSectionHolder
* twbDocuSectionSummary
* twbDocuSectionText
%ENDSECTION{"documentation"}%
---++ Implementation
<verbatim class="tml">
%STARTINCLUDE%<!-- render application documentation -->
%DBQUERY{
"WikiApplication='\b%IF{"defined NAME" then="%NAME%" else="%EXTRACT{text="%BASEWEB%" pattern=".*/(.+?)$" format="$1"}%"}%\b'
AND TopicType=~'\b%TYPE%\b'
%IF{"defined NOTTYPE" then=" AND !(TopicType=~'\b%NOTTYPE%\b')"}%"
web="%IF{"defined THEWEB" then="%THEWEB%" else="%BASEWEB%"}%"
hidenull="on"
remote="off"
header="<div class='twbDocuHolder'>
---+++ %TYPE%$n"
format="<div class='twbDocuSectionHolder'>
---++++ <nop>$topic
<div class='twbDocuSectionSummary'>$formfield(Summary)</div>
<div class='twbDocuSectionText'>$expand(_sectiondocumentation) ... [[$web.$topic][read more]]</div>
</div>"
separator="$n"
footer="</div>"
}%
<!-- //render application documentation -->%STOPINCLUDE%
</verbatim>
---++ Test
%DBCALL{"%TOPIC%" NAME="WikiWorkbench" TYPE="TopicFunction"}%
%DBCALL{"RenderFunctionCallers"}%
---++ Copyright
© 2006-2013 Michael Daum http://michaeldaumconsulting.com
%DBCALL{"GnuGeneralPublicLicense" section="notice"}%
%META:FORM{name="Applications.ApplicationTopic"}%
%META:FIELD{name="TopicType" title="TopicType" value="TopicFunction"}%
%META:FIELD{name="TopicTitle" attributes="" title="<nop>TopicTitle" value=""}%
%META:FIELD{name="Summary" attributes="c" title="Summary" value="Extracts the documentation section from all parts of a WikiApplication"}%
%META:FIELD{name="WikiApplication" attributes="" title="WikiApplication" value="WikiWorkbench"}%