[pmwiki-users] $MakePageNamePatterns (Was: Page names with space)

chr at home.se chr at home.se
Thu Sep 29 17:09:27 CDT 2005


On Thu, 29 Sep 2005, Patrick R. Michaud wrote:

> In current releases one can modify the $MakePageNamePatterns array to
> customize the way that strings are converted into pagenames.  Currently
> the default sequence is:
> 
>     "/'/" => '',                           # strip single-quotes
>     "/[^$PageNameChars]+/" => ' ',         # convert non-alnums to spaces
>     "/((^|[^-\\w])\\w)/e" 
>       => "strtoupper('$1')",               # initial caps after spaces
>     "/ /" => ''                            # strip spaces

I've put the text below at http://pmwiki.org/wiki/PmWiki/OtherVariables

:$MakePageNamePatterns:
: :$MakePageNamePatterns is an array of regular expression replacements 
that is used to map the page link in a ''free link'' such as [@[[free 
link]]@] into a page name. Currently the default sequence is: [@
    "/'/" => '',                           # strip single-quotes
    "/[^$PageNameChars]+/" => ' ',         # convert non-alnums to spaces
    "/((^|[^-\\w])\\w)/e" 
      => "strtoupper('$1')",               # initial caps after spaces
    "/ /" => ''                            # strip spaces
@]
 
maybe you could check/improve it? It might for instance be interesting to 
know if any other transformations are used. Is the result used directly as 
a sort of $pagename?  And what about a prepended groupname?

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr






More information about the pmwiki-users mailing list