[pmwiki-users] Page Names

Hans design5 at softflow.co.uk
Tue Jul 15 16:47:10 CDT 2008


Tuesday, July 15, 2008, 7:28:49 PM, Russell D Jones wrote:

>  The
> problem is that PmWiki doesn't seem to support the linking to a page
> titled "George W. Bush" but instead sends the user to the "Bush" page in
> the "George W" group.

You could try this markup definition as a replacement to the free
link markup [[free links]] (watch out for inadvertent line breaks due to
email software):

## [[free links]] without group
Markup('[[','links',"/(?>\\[\\[\\s*(.*?)\\]\\])($SuffixPattern)/e",
  "Keep(MakeLink(\$pagename,str_replace('. ',' ',PSS('$1')),PSS('$1'),'$2'),'L')");

Now a link like [[Franklin D. Roosevelt]] displays as
'Franklin D. Roosevelt' but links to page 'FranklinDRoosevelt'
in the current group. Note that the 'dot-space' is replaced by a
space, so a dot followed by a space is eliminated. That safeguards
somewhat links like [[Main.WikiSandbox]], where the group part will
be honoured, because it is not followed by a space.

To get 'Franklin D. Roosevelt' display as title of the page
'FranklinDRoosevelt' it still needs the insertion of a (:title :)
markup, but at least the initial link will lead to a correct page
creation.


  ~Hans




More information about the pmwiki-users mailing list