[pmwiki-users] pagelist format and $LinkPageCreateFmt
Hans
design at softflow.co.uk
Mon Feb 20 13:30:42 CST 2006
Perhaps it is easier by looking at it from a different angle:
A custom markup would be useful, which is a modification of the
general link markup [[target | text ]] and feeds a custom $LinkFmt to
the MakeLink function. The custom $LinkFmt is simply the same as
$LinkPageExistsFmt, which passes on any parameters as part of the page
name. The result is a link which regardless of the existence or
non-existence of a page simply links to that page.
I wonder if this would find some wider use.
I would use it in pagelist format templates for links to blog comments.
Here is a first attempt:
## [[[target | text]]]
$LinkPageNoEditFmt = "<a class='wikilink' href='\$LinkUrl'>\$LinkText</a>";
Markup('[[[|','>[[',
"/(?>\\[\\[\\[([^|\\]]*)\\|\\s*)(.*?)\\s*\\]\\]\\]($SuffixPattern)/e",
"Keep(MakeLink(\$pagename,PSS('$1'),PSS('$2'),'$3',$LinkPageNoEditFmt),'L')");
but the third closing bracket appears in the page after"text".
This works though: [[[target | text]]
Is there a better syntax?
Best,
~Hans
More information about the pmwiki-users
mailing list