01084

(: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
Assigned:
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,

Jan

You could use a custom markup like this:

## (:incedit <page>:)
Markup('incedit', '>if',
  '/\\(:incedit\\s+(\\S.*?):\\)/ei',
  "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