(:title 01084: Markup for

Summary: Markup for (:include :) with an [edit] link on top right
Created: 2009-03-18 08:06
Status: Open
Category: Feature
Priority: 3
Version: all
OS: doesn't matter

Description: Hi all!

I would like to have an more powerful (:include:) markup generates a link to edit the included page. Maybe its enough to add an optional parameter like:

(:include <page> link(=true):)

The =true may be specified or left out (which means true at all) Such a include simply does something like:

%rfloar% [[<page>|edit]]
(:include <page>:)

would do yet.

I think its a simple thing for all knows the core functions of PMWiki well. Hope someone could post the required markup fast.

Thanks and greets,


You could use a custom markup like this:

## (:incedit <page>:)
Markup('incedit', '>if',
  "IncEditMarkup(\$pagename, PSS('$1')) ");
function IncEditMarkup($pagename, $arg) {
  return "%rfloat% [[$arg|edit]] \n".PRR(IncludeText($pagename, $arg));

Note I have not tested it with complicated args, but it seems to work with a pagename. - HansB July 08, 2009, at 01:09 PM