[pmwiki-users] Change default page name separator to "-", ie "Page-Name"

DaveG pmwiki at solidgone.com
Wed Feb 25 13:21:12 CST 2009


Ed W wrote:
> OK, I may as well ask all my controversial questions at once...
> 
> I notice that all the cool cats on the web have moved their URLs to be
> in the style of "this-is-my-page-about-milk-drinks" since most search
> engines seem to be able to parse this as separate words (and Google's
> algorithm appear to give extra weight to links which contain keywords in
> the link pointing to a page containing those keywords)
> 
> Given that I notice PmWiki moving away from CamelCase wiki words, it
> seems like there should be little resistance to proposing a change in
> the default URL naming convention also...
Not addressing your point regarding the default, but it's possible to do 
this today with:
$MakePageNamePatterns = array(
   "/'/" => '',
   "/[^-[:alnum:]]+/" => '-',   #"/[^$PageNameChars]+/" => '-',
   '/((^|[^-\\w])\\w)/e' => "strtoupper('$1')",  #'/(.*)/e' => 
"strtolower('$1')",
   "/\\s+/" => "$Blogger_TitleSeparator");

I had to change from $PageNameChars, as it seemed to cause an error -- I 
didn't spend much time tracking down why.

Also, I tried to convert the title to lower case, (the strtolower) but 
hit some problems there as well.


  ~ ~ Dave



More information about the pmwiki-users mailing list