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