Directives
- This page needs to be cleaned up for 2.0 release.
- Where in the source are directives listed, what filename(s) and function(s)?
- There should be a comprehensive enumeration of directives in documentation, even if some are left undocumented, for now.
Cross Reference:
- See also the Markup Master Index?.
PmWiki uses the markup sequence (:directive ...:) for a number of directives and text substitutions. Many of these replace the "double-bracket" directives that were used in PmWiki 1.0 and earlier versions. Here's a brief description of each.
(:title Patrick's home page:)
If we want to allow the user to specify a page's title, yet keep the original WikiWord? for the crumbstrail as an unaltered variable in the template, how can this be done? like a subtitle directive instead of title, or some var that retains the title after the title directive alters it.
<meta name='keywords' content='word, ...' /> tag.
(:description A page about ...:)
<meta name='description' content='A page about...' /> tag.
(:comment This won't be displayed:)
(:include PageName:) and (:include PageName#start#end:)
(:include RecentChanges#1#10:) grabs only the first ten lines of the Recent Changes? file.
(:include:) directive, thus:
(:include SomePage :) - include all of SomePage(:include SomePage lines=10 :) - include lines 1-10 of SomePage(:include SomePage lines=1..10 :) - include lines 1-10 of SomePage(:include SomePage lines=6..10 :) - include lines 6-10 of SomePage(:include SomePage lines=6.. :) - include lines 6 to end of SomePage(:include SomePage lines=6..6:) - include only line 6 of SomePage
(:noheader:),
(:nofooter:),
(:notitle:),
(:nogroupheader:),
(:nofootheader:),
etc.
(:if cond param:) syntax allows portions of the markup text to be conditionally processed (up to the next (:if:)) depending on administrator-defined conditions. The predefined conditions are "true", "false", "group", and "name". For example,
(:if group PmWiki:)This text displays only in the PmWiki group(:if:)
(:pagelist group=xxx fmt=yyy list=zzz:)
(:pagelist ..:) syntax allows to include a bulleted list of pagenames which are within the specified group. The group and pagenames are displayed as links.
group=xxx- optional, xxx = name of group, which pages should be included in the list
Q: can you specify pages as well, e.g via regex or matching name-prefix: Group\.PREF.* = all pages of group "Group" starting with "PREF"A: No, just groups and not pages. There may be a new option added at some point that allows specifying fullnames by regex. Plus there's always thelist=zzzoption below which does allow arbitrary lists.fmt=yyy- optional, yyy =
bygroup- default, level 1 list entries for each group with level 2 list entries for each page of a group
simple- one line per page, using full pagename: "* groupname.pagename", no group headers
group- list just groups: "* groupname"
- see also
- Cookbook:DictIndex
list=zzz- optional, zzz =
normal- don't include special pages like
RecentChanges,GroupHeaderandGroupFooterin the list
(:pagelist:) to get a list of all pages,
(:pagelist group=PmWiki:) to get a list of all pages in the PmWiki group,
(:pagelist group= -PmWiki -PmWikiDe:) to get a list of all pages except those in the PmWiki and PmWikiDe group (the blank before the first '-' is mandatory),
(:pagelist group={$Group}:) to get a list of all pages in the current group,
(:pagelist group={$Group} list=normal:) to get a list of all pages in the current group except GroupHeader, GroupFooter, RecentChanges etc.,
(:pagelist fmt=group :) to get a list of all groups,
(:pagelist fmt=group -{$Group} :) to get a list of all groups exept the current one.
$RCTime = strftime('%b %d %H:%M',$Now);
$RecentChangesFmt['Main.RecentPages'] = ':[[$FullName]]: $RCTime';
(:searchresults group=xxx fmt=yyy list=zzz text:)
For usage of group, fmt and list, see the (:pagelist:) directive above.
Category: Includes
<< | PmWiki.Documentation Index? | >>

