|
Main sidebar
|
PITS /
01084Summary: Markup for (:include :) with an [edit] link on top right
Created: 2009-03-18 08:06
Status: Open
Category: Feature
From: JanBernitt?
Assigned:
Priority: 3
Version: all
OS: doesn't matter
Description: Hi all! I would like to have an more powerful (:include <page> link(=true):) The %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 |