source: branches/mbutscher/work/WikidPadHelp/data/WikiDocumentAttributes.wiki @ 195

Last change on this file since 195 was 178, checked in by mbutscher, 11 years ago

2.0preAlpha (internal)

Works so far, now editing help wiki.

File size: 8.1 KB
Line 
1++ Wiki Document Attributes
2
3Wiki pages support "attributes". Attributes serve 2 purposes.  They
4allow you to index your data by attribute, in addition to by wikiword,
5and they are used to specify certain special wiki formatting commands.
6
7You can attach attributes to a page like this:
8
9[attribute: value]
10
11Setting an attribute like this makes this document available under the
12*Views* node in the tree on the left, under importance/high.  Example
13attributes you might want to add to your wiki words might be:
14
15[contact: work]
16[contact: private] for wiki contacts, ie JohnDoe
17[work-related: true] to mark something as work related
18[contact.personal.kids: school] to mark something as personal contact
19about school of the kids.
20
21Open the "Views" node in the tree on the left to see how these attributes
22become available for reference.
23
24If you have multiple attributes with same key but different value, e.g.
25<<
26[alias: Foo]
27[alias: Bar]
28[alias: FooBar]
29>>
30
31You can write them as multiple values in a single attribute, separated by semicolon, e.g.
32<<
33[alias: Foo; Bar; FooBar]
34>>
35
36You can also quote the values, if they contain disallowed characters, e.g.
37[contact: "Carl [Home]"]
38
39The precise quoting syntax is the same as for [Insertions]#+++# Syntax
40
41
42+++ Autocompletion
43
44Attributes also support auto completion. Try it:
45
46Place cursor after the m and press CTRL-SPACE
47[im
48
49
50+++ Attribute Based Tree Formatting
51
52There are 3 special attributes you can attach to a page that control
53the appearance of the page's node in the tree. These attributes override any global settings (see below):
54
55icon: name (see TreeIcons)
56color: (white, blue, etc., see TreeNodeColors)
57bold: (true or false)
58
59Example:
60[icon: lens] changes the icon for this page to a lens.
61
62These attributes can also be written in a todo item. If used there, they control the presentation of the todo entry (below the special "Views" node) instead of the wiki page.
63
64Example:
65todo: Show another color [color: orange]
66
67
68
69You can also use global attribute properties to change the appearance based on the existence of other properties.
70
71Examples:
72
73[global.importance.high.bold=true]
74
75This means any document in the wiki with an "importance" attribute
76that has a value of high will be bold.
77[importance: high]
78So setting the above attribute is what made this document bold
79in the tree.
80
81
82If the global definition contains the first part(s) of an attribute the appearance is also changed.
83
84Example:
85
86Above we had already defined:
87\[contact.personal.kids: school]
88
89The following defines that pages containing attributes beginning with "contact" part have color Indian red:
90[global.contact.color: indian red]
91
92But the node isn't colored so because of this more specific definition to use dark orchid for attributes beginning with "contact.personal":
93[global.contact.personal.color: dark orchid]
94
95
96When creating a new wiki some default global attributes are
97automatically attached to the root wiki document on the WikiSettings page.
98
99
100+++ Special Attributes
101
102*priority: 1-5*
103The priority setting will set the node text in the tree to
104"WikiDocumentAttributes (3)" for example.  It also will affect the
105importance setting of the node if "importance" is not already set.
106
107[priority: 3]
108
109
110*font: font face name*
111Change the editor font of a page or the whole wiki.
112See WikiFonts for example and details.
113
114
115*camelCaseWordsEnabled: "true" or "false"*
116Control, if on one page or all pages (prefixed with "global") CamelCaseWords should be interpreted as wiki links.
117
118Bracketed words (e.g. [CamelCaseWords] are always seen as links).
119
120
121*paragraph_mode: "true" or "false"*
122Choose if for one or all pages a newline in editor is shown as new line in HTML preview/export (paragraph_mode: false) or is ignored and only an empty line starts a new paragraph (paragraph_mode: true).
123
124This paragraph is shown in
125preview differently if you
126remove the backslash from the following attribute,
127save the page and then switch to preview.
128
129This will be a new paragraph. To make a line break
130in paragraph mode, write the HTML tag 'br'.<br>
131Now we start again here.
132
133\[paragraph_mode: true]
134
135
136*alias: other page name*
137Set another name under which a page can be linked to.
138
139Example:
140To this page can also be linked as WikiDocumentAttribute.
141[alias: WikiDocumentAttribute]
142
143
144*import_scripts: page to import scripts from*
145See InlinePythonEval.
146
147
148*child_sort_order: order how to sort child nodes in the tree*
149Possible values are:
150    * ascending: Sort alphabetically ascending
151    * descending: Sort alphabetically descending
152    * mod_oldest: Sort by modification date, oldest first
153    * mod_newest: Sort by modification date, newest first
154    * unsorted: Make no attempt to sort (fastest)
155    * natural: Sort in order of appearance of the words on the page (may not always work)
156
157You can also use the attribute global.child_sort_order to control the default for the wiki (without this attribute "ascending" is used)
158
159
160*export: Export this page*
161Control if the page containing this attribute should be exported. Only possible value is "false".
162The HTML exporter respects this attribute, others, like the multipage text exporter, do not.
163
164
165*template: page which content should be used as template*
166See [Templates]
167
168
169*template_head: "auto" or "manual"*
170Choose if a new page created from a template should take the heading from the template or should automatically create a new one.
171See [Templates]
172
173
174*pagetype: type of the page*
175Controls some behavior of the editor.
176
177Currently only type "form" is supported (see [FormPages] for details).
178
179
180*language: language code*
181Controls language of a page or the wiki (with "global." prepended) for [SpellChecking].
182
183
184*html.linkcolor*
185Specify the color of a link in preview/HTML export with a numeric HTML color (e.g. "#000000" for black).
186
187*html.alinkcolor*
188Color of a link while hovering over it with the mouse or while mouse is pressed (depends on browser). Doesn't work for internal preview.
189
190*html.vlinkcolor*
191Color of an already visited link. Doesn't work for internal preview.
192
193*html.textcolor*
194Color of normal text.
195
196*html.bgcolor*
197Color of background.
198
199*html.bgimage*
200Link (URL) to a background image. Doesn't work for internal preview.
201
202
203*auto_link*
204Allow recognition of non-camelcase wiki words in normal text (without brackets). Supported values:
205
206    * off: Switch off recognition
207    * relax: Recognition is case-insensitive and maps arbitrary
208      non alpha-numeric characters in text to white spaces in the
209      wiki word.
210
211When active, e.g. text "multipage text, format" is recognized as wikiword [Multipage text format].
212
213You can also use "global.auto_link" to set the option for the whole wiki.
214
215
216*view_pane*
217Controls which pane should be shown when a page is opened:
218
219    * off: Don't change pane
220    * editor: Show editor pane
221    * preview: Show preview pane
222
223You can also use "global.view_pane".
224
225
226*short_hint*
227If you place the mouse pointer over the wiki link to a page which contains this attribute, the value of the attribute is shown as a tooltip. E.g. place the mouse pointer over this link and let it rest one moment:
228    ShortHintAttribute
229
230
231*global.graph.relation.exclude*
232*global.graph.relation.include*
233See WikiStructureGraphs.
234
235
236+++ Error checking
237
238The 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.
239
240Currently it checks the attributes alias, color, icon and bold. The presentation attributes inside todo items are not checked.
241
242The 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.
243
244To test the error checking, remove the backslash on the following line and save the page:
245
246\[icon: doesntexist]
247
248Double clicking a message brings the editor to the offending attribute. Position may be a bit off if page was modified after saving.
249
250
251[tree_position: 6]
Note: See TracBrowser for help on using the repository browser.