UsefulInterMapLinks2
<< | Cookbook-V1 | >>
Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
More useful intermap prefixes
See PmWiki/InterMap for information about what an "intermap link" is.
Goal
Allow the users of a wiki site to create "edit-links" etc by writing Edit:Group.SomePage
Solution
Simply add
Edit http://yourserver.com/path/to/wiki?pagename=$1&action=edit
to your localmap.txt
. Similarly, you can add:
History http://yourserver.com/path/to/wiki?pagename=$1&action=diff
to allow History:Group.SomePage
to work.
Discussion
Note that there are still some difficulties here -- in particular,
Edit: will always have to be followed by Group.PageName
or Group/PageName
;
i.e., Edit:PageName
(to edit a page in the current group) won't work.
A possible workaround here is to use: Edit:[[$Group]].PageName
.
See Also
- Cookbook.UsefulInterMapLinks
- PmWiki.InterMap
History
- From a discussion on the list, see gmane.comp.web.wiki.pmwiki.user:4733
Comments & Bugs
In order to change how this is shown on screen, you still have to write something like:
[[Edit:Group.SomePage edit SomePage]]
- Idea
- It could be useful to have an intermap prefix for generating a list of pages in the current group, i.e. the link would actually do a search for
[[$Group]]/
. This is something I often code by hand, and having a prefix such asListPage:Group
would be convenient.
Contributors
pmwiki-2.3.38 -- Last modified by {{chr}}