Metainformationen zur Seite

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
en:wiki:syntax [2022/09/15 21:00] Michael Schlenstedten:wiki:syntax [2022/09/18 09:50] (aktuell) Michael Schlenstedt
Zeile 911: Zeile 911:
 | msoffice                                                    | unclear if working                                          | | msoffice                                                    | unclear if working                                          |
 | msstream                                                    | unclear if working                                          | | msstream                                                    | unclear if working                                          |
 +
 +==== Include Plugin ====
 +
 +This is a handy plugin with which you can include another wiki page into the current one. Just including certain sections of a page or even whole namespaces is supported, too.
 +
 +=== Examples ===
 +
 +''%%{{page>wiki:syntax#Tables}}%%'' will include the section about tables of the syntax page.
 +
 +''%%{{namespace>project_foo}}%%'' will include all pages in the ''project_foo'' namespace.
 +
 +''%%{{page>blog:mypage&tags&comments}}%%'' will include the page ''blog:mypage'' and show the tags from the [[tag]] plugin and the number of comments from the [[discussion]] plugin. Both plugins need to be installed for this example.
 +
 +''%%{{tagtopic>testtag}}%%'' will include all pages with the tag ''testtag'', the [[tag]] plugin needs to be installed for this example.
 +
 +=== Syntax ===
 +
 +Simply enclose the ID of the page to be included in double curly brackets:
 +
 +  {{page>[id]&[flags]}}
 +  {{section>[id]#[section]&[flags]}}
 +  {{namespace>[namespace]#[section]&[flags]}}
 +  {{tagtopic>[tag]&[flags]}}
 +
 +^ [id] | page ID of the page to include; some [[#macros]] are possible; shortcuts are resolved ('':'', ''.'', ''..'') | required |
 +^ [section] | limits the included page to a specific section and its subsections | optional; default is the whole page , this can be used with namespace (if matches)|
 +^ [tag]|include pages with tag topic tag, requires [[plugin:tag]] |required |
 +^ [flags] | flags delimited by ''&'', see [[#Configuration and Flags|flags]] | optional |
 +
 +The plugin offers four syntaxes, ''%%{{page>...}}%%'' , ''%%{{section>...}}%%'' , ''%%{{namespace>...}}%%'' and ''%%{{tagtopic>...}}%%''.
 +
 +Section is aimed more at including sections, page at including whole pages and namespace at including whole namespaces. Tagtopic includes all pages with a ''tagtopic'' ''tag''.
 +
 +=== Configuration and Flags ===
 +
 +The plugin can be configured in the DokuWiki configuration manager available in the admin menu. These settings also affect the [[plugin:blog]] plugin which uses the include plugin to generate the blog page. For most settings there are flags that allow to override the setting. Some features are only available as flag.
 +
 +^ Configuration option  ^ Flags                                                            ^ Description                                                                                                                                                                                                                                                                                                                                                                      ^
 +^ ''noheader''          | ''noheader''/ (''show'')''header''                               | Don't display the header of the inserted section                                                                                                                                                                                                                                                                                                                                 |
 +^ ''firstseconly''      | ''firstsec''(''tion'')''only''/ ''fullpage''                     | Display only the first section of the included page                                                                                                                                                                                                                                                                                                                              |
 +^ ''readmore''          | ''readmore''/''noreadmore''                                      | Show "read more" link in case of firstsection only                                                                                                                                                                                                                                                                                                                               |
 +^ ''showtaglogos''      | -                                                                | Show/hide an image for the first tag (if the page has tags)                                                                                                                                                                                                                                                                                                                      |
 +^ ''showfooter''        | ''footer''/''nofooter''                                          | Show/hide page footer below the included page                                                                                                                                                                                                                                                                                                                                    |
 +^ ''showlink''          | ''link''/''nolink''                                              | Makes the first headline of a included page/section a link to the included page/section                                                                                                                                                                                                                                                                                          |
 +^ ''showpermalink''     | ''permalink''/ ''nopermalink''                                   | Show/hide a permalink to the included page in the page footer                                                                                                                                                                                                                                                                                                                    |
 +^ ''showdate''          | ''date''/''nodate''                                              | Show/hide creation date of the page in the page footer                                                                                                                                                                                                                                                                                                                           |
 +^ ''showmdate''         | ''mdate''/''nomdate''                                            | Show/hide modification date of the page in the page footer                                                                                                                                                                                                                                                                                                                       |
 +^ ''showuser''          | ''user''/''nouser''                                              | Show/hide user name of the page creator in the page footer                                                                                                                                                                                                                                                                                                                       |
 +^ ''showcomments''      | ''comments''/''nocomments''                                      | Show/hide number of comments in the page footer (requires the [[plugin:discussion]] plugin)                                                                                                                                                                                                                                                                                      |
 +^ ''showlinkbacks''     | ''linkbacks''/''nolinkbacks''                                    | Show/hide number of linkbacks in the page footer (requires the [[plugin:linkback|linkback]] or [[plugin:backlinks2]] plugin)                                                                                                                                                                                                                                                     |
 +^ ''showtags''          | ''tags''/''notags''                                              | Show/hide tags in the page footer (requires the [[plugin:tag]] plugin)                                                                                                                                                                                                                                                                                                           |
 +^ ''showeditbtn''       | ''editbtn'' or ''editbutton''/''noeditbtn'' or ''noeditbutton''  | Show/hide edit buttons (section edit buttons, edit button below the included page)                                                                                                                                                                                                                                                                                               |
 +^ ''doredirect''        | ''redirect''/''noredirect''                                      | Redirect back to original page after an edit                                                                                                                                                                                                                                                                                                                                     |
 +^ ''usernamespace''     | -                                                                | Namespace for user pages (see ''showuser'' configuration) (default ''user''                                                                                                                                                                                                                                                                                                    |
 +^ ''doindent''          | ''indent''/''noindent''                                          | Indent included pages relative to the section of the page they get included in                                                                                                                                                                                                                                                                                                   |
 +^ ''linkonly''          | ''linkonly''/''nolinkonly'' or ''include_content''               | Display only a link instead of the whole page content                                                                                                                                                                                                                                                                                                                            |
 +^ '' title''            | ''title''/''notitle''                                            | Show the title instead of the page id                                                                                                                                                                                                                                                                                                                                            |
 +^ ''pageexists''        | ''pageexists''/ ''nopageexists''                                 | Only list page ids of existing pages (see ''existlink''                                                                                                                                                                                                                                                                                                                        |
 +^ -                     | ''existlink''                                                    | Display a link and do so only if page page-id exists (combination of ''linkonly'' and ''pageexists''                                                                                                                                                                                                                                                                           |
 +^ ''parlink''           | ''parlink''/''noparlink''                                        | (Don't) put the link into a paragraph environment (for inline lists)                                                                                                                                                                                                                                                                                                             |
 +^ ''order''             | ''order=OPTION''                                                 | Ordering criteria for namespace includes, possible options: page ID (''id''), title (''title''), date created (''created''), date modified (''modified''), [[plugin:indexmenu#metadata_tag_syntax|indexmenu sort order]] (''indexmenu''), custom sort order using the ''%%{{include_n>[number]}}%%'' on the pages that are included similar to the indexmenu tags (''custom'').  |
 +^ ''rsort''             | ''rsort''/''sort''                                               | Reverse the sort order in namespace includes.                                                                                                                                                                                                                                                                                                                                    |
 +^ ''depth''             | ''depth=DEPTH''                                                  | The maximum depth of subnamespaces of which pages are included in namespace includes, default is ''1'' for only the specified namespace, ''0'' is for unlimited depth.                                                                                                                                                                                                           |
 +^ -                     | ''inline''                                                       | Don't close/open sections when including a page. This flag should be used when the include syntax is used inside other syntax elements like lists or tables or inside other plugin syntax.                                                                                                                                                                                       |
 +^ -                     | ''beforeeach=ENTITY''/ ''aftereach=ENTITY''                      | Display an [[:entities|entity]] before/after each included page. The entity is printed outside the section/include environment, this is mainly for adding custom HTML code (when the text isn't recognized as entity it is directly displayed but escaped so you can't directly use HTML code here).                                                                             |
 +^ ''safeindex''         | -                                                                | Don't index metadata of included pages that are non-public. This can cause problems with other plugins that use the metadata index and can be safely disabled in wikis where the permissions of the included pages match the permissions of the parent pages.                                                                                                                    |
 +^ -                     | ''exclude=/REGEX/''                                              | Regular expression to exclude certain pages, will match on full page ID. E.g. to exclude ''ns:page_name'' use ''/ns:page_name/'' as value. Use a [[https://regex101.com/|regex tester]] to debug complicated patterns.                                                                                                                                                           |
 +
 +Examples:
 +
 +  {{page>concept&firstseconly&footer}}
 +  {{page>mypage&noindent}}
 +  {{namespace>myns&order=modified}}
 +  {{namespace>myns&exclude=/myns:subns:.+|myns:page/}}
 +
 +=== Macros ===
 +
 +Simple macros are possible to serve a page on a per user or per date base. These are:
 +
 +^ @USER@  | username |
 +^ @NAME@  | full name of user |
 +^ @GROUP@ | first group the user belongs to |
 +^ @YEAR@  | 4-digit year |
 +^ @MONTH@ | 2-digit month |
 +^@WEEK@ |2-digit ISO week number |
 +^ @DAY@   | 2-digit day |
 +^ @DATE<expr>@ | use a calculated date instead of today in date macros |
 +
 +<expr> in **''@DATE<expr>@''** can be one of:
 +
 +^ PYEAR | previous year |
 +^ NYEAR | next year |
 +^ PMONTH | previous month |
 +^ NMONTH | next month |
 +^ PWEEK | previous week |
 +^ NWEEK | next week |
 +^ YESTERDAY | yesterday's date |
 +^ TOMORROW | tomorrow's date |
 +
 +Examples:
 +
 +  {{page>@MONTH@:@DAY@:birthdays}}
 +includes the page ''birthdays'' in namespace <month>:<day>: eg. ''10:15: birthdays'' for the 15th of october.
 +
 +  {{page>@USER@:message}}
 +includes the page ''message'' from the namespace <user> of the logged in user
 +
 +  {{page>foo@DATENWEEK@@YEAR@:@WEEK@}}
 +includes the page <weekno> from the namespace ''foo<year>'' with next week's date  e.g.  foo2012:01 for the 27th of december 2011
 +
 +==== (To)Do Plugin ====
 +
 +The do plugin allows users to create simple tasks in wiki pages. Those tasks may be assigned to other users and have a due date. Tasks can be listed in pages as well. 
 +
 +=== Syntax ===
 +
 +There are two syntax elements.
 +
 +== Task ==
 +
 +  <do USER DATE>TEXT</do>
 +
 +Create a new task TEXT, optionally assign it to USER or mark it as due on DATE; there is a toolbar button for this as well.
 +
 +
 +^ Part  ^ Details                                                                                              ^
 +| USER  | User id as accepted by current authentication backend                                                |
 +| DATE  | Date in format ''yyyy-mm-dd''                                                                        |
 +| TEXT  | Description of task. Task texts needs to be **unique at a page**. Duplicates are seen as same task.  |
 +
 +== Listing ==
 +
 +  {{dolist>NAMESPACE?id=ID&status=(DONE|UNDONE)&limit=COUNT&md5=MD5&user=ASSIGNEE&creator=CREATOR&from=YYYY-MM-DD&to=YYYY-MM-DD}}
 +
 +List tasks in NAMESPACE with optional additional filtering
 +
 +^Part        ^Details ^
 +|NAMESPACE   |Namespace to search for tasks |
 +|''id''      |Page to search for tasks |
 +|''status''  |Can have value ''DONE'' or ''UNDONE''. Case insensitive. |
 +|''limit''   |Maximum number of items to display.  |
 +|''md5''     |Show only task with this MD5 value|
 +|''user''    |User id of assigned person or ''@USER@''|
 +|''creator'' |User id of creator |
 +|''from''    | Date YYYY-MM-DD |
 +|''to''      | Date YYYY-MM-DD |