root/branches/mbutscher/work/WikidPadHelp/data/WikiDocumentAttributes.wiki @ 269

Revision 269, 9.1 kB (checked in by APA, 2 years ago)
Line 
1[:page:PageHeader][:toc:]
2+ Wiki Document Attributes
3
4WikiPages support "attributes". Attributes serve two purposes:
5
6        * You may index your data by attribute (in addition to: by WikiWord)
7        * They are used to specify certain special WikiFormattingCommands
8
9You can attach attributes to a page like this:
10
11\[attribute: value]
12
13By such setting of an attribute, this document can be seen under the
14["Views" node] in the ["Tree" pane] on the left, under importance/high.
15
16Attributes you might want to add to your WikiWords, for example, might be:
17
18[contact: work]
19[contact: private] for wiki contacts, ie JohnDoe
20[work-related: true] to mark something as work related
21[contact.personal.kids: school] to mark something as personal contact
22about school of the kids.
23
24Open the ["Views" node] in the ["Tree" pane] on the left to see how these
25attributes become available for reference.
26
27++ Multiple Attribute Values
28
29Some attribute key may have have multiple values, e.g.
30<<
31[alias:Foo]
32[alias:Bar]
33[alias:FooBar]
34>>
35
36Abbreviate multiple values of same attribute by writing them separated by semicolon, e.g.
37<<
38[alias:Foo; Bar; FooBar]
39>>
40
41++ Quoting Values
42
43You can also quote the values, if they contain disallowed characters, e.g.
44[contact: "Carl [Home]"]
45
46The precise quoting syntax is the same as for [Insertions]#++ Syntax
47
48
49++ AutoCompletion
50
51Attributes also support AutoCompletion. Try it:
52
53Place the cursor behind the m and press [Ctrl-Space]
54[im
55
56
57++ Formatting a Page
58
59+++ Attribute Based Tree Formatting
60
61There are 3 special attributes which you can attach to a page in order to control
62the appearance of the page's node in the ["Tree" pane].
63
64These attributes override any [global settings] (see below):
65
66+++++ icon: name
67
68Example:
69[icon:lens]
70\[icon:lens] changes the icon for this page to a lens.
71
72        See TreeNodeIcons
73
74+++++ color: (white, blue, etc.)
75        See TreeNodeColors
76       
77+++++ bold: (true or false)
78Set the font weight of the title of the WikiPage as shown in the ["Tree" window] to bold, or to normal.
79
80+++ Formatting a TodoItem
81
82Such attributes can also be written in a TodoItem. If used there, they control the presentation of the TodoEntry (below the special ["Views" node]) instead of the WikiPage.
83
84Example:
85todo: Show another color [color: orange]
86
87
88++ Using Global Attribute Properties
89
90You can also use global attribute properties to change the appearance based on the existence of other properties.
91
92Examples:
93
94[global.importance.high.bold=true]
95
96This means any document in the wiki with an "importance" attribute
97that has a value of high will be bold.
98[importance: high]
99So setting \[importance: high] above is what makes the title of this document look bold in the ["Tree" window].
100
101
102If the global definition contains the first part(s) of an attribute the appearance is also changed.
103
104Example:
105
106Above we had already defined:
107\[contact.personal.kids: school]
108
109The following defines that pages containing attributes beginning with "contact" part have color Indian red:
110[global.contact.color: indian red]
111
112But the node isn't colored so because of this more specific definition to use dark orchid for attributes beginning with "contact.personal":
113[global.contact.personal.color: dark orchid]
114
115
116When creating a new wiki some default global attributes are
117automatically attached to the root wiki document on the WikiSettings page.
118
119
120++ Special Attributes
121
122+++++ priority: 1-5
123The priority setting will set the node text in the tree to
124"WikiDocumentAttributes (3)" for example.  It also will affect the
125importance setting of the node if "importance" is not already set.
126
127[priority: 3]
128
129
130+++++ font: font face name
131For the current page or the for whole wiki, set a particular font face to be used by the WikiTextEditor,
132See WikiFonts for example and details.
133
134
135+++++ camelCaseWordsEnabled: "true" or "false"
136Control, if on one page or all pages (prefixed with "global") CamelCaseWords should be interpreted as wiki links.
137
138Bracketed words (e.g. [CamelCaseWord] are always seen as links).
139
140
141+++++ paragraph_mode: "true" or "false"
142Choose if for one or all pages.
143
144A newline in the WikiTextEditor is shown:
145        * as new line in [HTML preview]/[HTML export] (paragraph_mode: false) or
146        * is ignored and only an empty line starts a new paragraph (paragraph_mode: true).
147
148This paragraph is shown in
149preview differently if you
150remove the backslash from the following attribute,
151save the page and then switch to preview.
152
153This will be a new paragraph. To make a line break
154in paragraph mode, write the HTML tag 'br'.<br>
155Now we start again here.
156
157\[paragraph_mode: true]
158
159
160+++++ alias: other page name
161Set another name under which a page can be linked to.
162
163Example:
164To this page can also be linked as WikiDocumentAttribute.
165[alias:WikiDocumentAttribute]
166
167
168+++++ import_scripts: page to import scripts from
169See InlinePythonEval.
170
171
172+++++ child_sort_order: order how to sort [child nodes] in the tree
173Possible values are:
174    * ascending: Sort alphabetically ascending
175    * descending: Sort alphabetically descending
176    * mod_oldest: Sort by modification date, oldest first
177    * mod_newest: Sort by modification date, newest first
178    * unsorted: Make no attempt to sort (fastest)
179    * natural: Sort in order of appearance of the words on the page (may not always work)
180
181You can also use the attribute global.child_sort_order to control the default for the wiki (without this attribute "ascending" is used)
182
183
184+++++ tree_position: Order number for position in subtree
185Gives a position number where to place a particular word in the tree relative to its siblings. 1 places it at the top, 2 at the second-top and so-on (if place is occupied by another word with same position, it is placed as near as possible). A high value like e.g. 10000 places it at the bottom.
186
187Be aware that a word may have multiple parents, can therefore appear multiple times in the tree and will each time try to place itself at the given position.
188
189
190+++++ export: Do not export this page
191Control if the page containing this attribute should be exported. Only
192the value "false" is permitted here. The [HTML exporter] respects this
193attribute, others exporters such as the [multipage text exporter] do
194*not* respect this attribute.
195
196+++ Templates
197
198+++++ template: page which content should be used as template
199See [Templates]
200
201+++++ template_head: "auto" or "manual"
202Choose if a new page created from a template should take the heading from the template or should automatically create a new one.
203See [Templates]
204
205
206+++++ pagetype: type of the page
207Controls some behavior of the WikiTextEditor.
208
209Currently only type "form" is supported (see [FormPages] for details).
210
211+++ Spell Checking
212
213+++++ language: language code
214Controls language of a page or the wiki (with "global." prepended) for [SpellChecking].
215
216+++ html Colors and Background
217
218+++++ html.linkcolor
219Specify the color of a link in preview/HTML export with a numeric HTML color (e.g. "#000000" for black).
220
221+++++ html.alinkcolor
222Color of a link while hovering over it with the mouse or while mouse is pressed (depends on browser). Doesn't work for internal preview.
223
224+++++ html.vlinkcolor
225Color of an already visited link. Doesn't work for internal preview.
226
227+++++ html.textcolor
228Color of normal text.
229
230+++++ html.bgcolor
231Color of background.
232
233+++++ html.bgimage
234Link (URL) to a background image. Doesn't work for internal preview.
235
236
237+++ auto_link
238Allow to recognize WikiWords, which are not CamelCase in normal text (without brackets).
239
240Supported values are:
241
242    * off: Switch off recognition
243    * relax: Recognition is case-insensitive and maps arbitrary
244      non alpha-numeric characters in text to white spaces in the
245      WikiWord.
246
247When active, e.g. text "multipage text, format" is recognized as WikiWord [Multipage text format].
248
249You can also use "global.auto_link" to set the option for the whole wiki.
250
251
252+++++ view_pane
253Controls which pane should be shown when a page is opened:
254
255    * off: Don't change pane
256    * editor: Show editor pane
257    * preview: Show preview pane
258
259You can also use "global.view_pane".
260
261
262+++++ short_hint
263
264See ["short_hint" attribute]
265
266
267+++ Structure Graphs
268
269+++++ global.graph.relation.exclude
270See WikiStructureGraphs.
271
272+++++ global.graph.relation.include
273See WikiStructureGraphs.
274
275
276++ Error checking
277
278The content of a page is checked on saving for logical errors in some of the special attributes. There is a [log window] below the editor (normally hidden) which shows error messages if something is wrong.
279
280Currently it checks the attributes alias, color, icon and bold. The presentation attributes inside TodoItems are not checked.
281
282The [log window] normally automatically pops up if new messages arrive and automatically hides when there are no more messages (both can be switched off in configuration dialog.
283
284To test the error checking, remove the backslash on the following line and save the page:
285
286\[icon:doesntexist]
287
288Double clicking a message brings the editor to the offending attribute. Position may be a bit off if page was modified after saving.
289
290
291[:page:PageFooter][tree_position: 6]
Note: See TracBrowser for help on using the browser.