[pmwiki-users] AsSpaced function with dashed words instead of wiki words

Petko Yotov 5ko at 5ko.fr
Tue May 16 10:50:30 CDT 2017


If it is only about URLs, you can try the recipe Router, with the 
CamelCaseToLowerCase option:

   http://www.pmwiki.org/wiki/Cookbook/Router

With the recipe enabled, you use WikiWords and links and page variables, 
and templates, and skins like you do now, you do not add dashes in your 
wiki text, you keep thinking of your pages as PmWikiPtBr, HomePage, 
AllRecentChanges etc. but the URLs will be pm-wiki-pt-br, home-page, 
all-recent-changes. Most existing links should continue to work.  If you 
have pagenames with dashes now, they may not work well, or with 
uppercase international characters may or may not work well (you could 
rename/move those if they are not many).

So, in the wiki you keep using [[Main/HomePage]] as a link, the URL will 
contain "main/home-page".

If you redefine too hard the AsSpaced function or $MakePageNamePatterns, 
indeed some things may break and some existing pages may become 
"hidden/invisible" to PmWiki.

Petko

---
Change log     :  http://www.pmwiki.org/wiki/PmWiki/ChangeLog
Release notes  :  http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes
If you upgrade :  http://www.pmwiki.org/wiki/PmWiki/Upgrades


On 2017-05-16 17:13, Carlos AB wrote:
> I would like to know what is the behaviour of AsSpaced for dashed
> words eg. "my-page-name" instead of WikiWords, when creating the
> $FmtPV variables $Titlespaced, $Grouspaced and $Namespaced.
> 
> Would it be difficult to make dashed-words work like WikiWords for
> those variables?
> 
> I see that wiki words are treated differently by google, google
> understands WikiWords as just one word for exact match queries, and
> you end up creating a new word for google, and a new "niche" for
> related keywords. That behaviour was different back in 2006,  AFAIK,
> because no word used in the query would match to any page in Google
> index, now it matches some words and parts of a WikiWord.
> 
> It is nice to have a new type of keyword, creating new related
> keywords to it, but if you are building for adsense as well, it
> removes some of the fun and the payments as well.
> 
> So, my question is: How can I start to change the behaviour of
> AsSpaced (or in my case AsSpacedUTF8) and if it will break pmwiki
> somewhere?



More information about the pmwiki-users mailing list