[Pmwiki-users] subpages (was: Why heirarchy?)

John Rankin john.rankin
Sun Oct 24 18:51:52 CDT 2004


On Friday, 22 October 2004 9:39 AM, John Rankin <john.rankin at affinity.co.nz> wrote:

>The following should work (give or take php syntax errors):
>
>Markup('[[_','<links','/\[\[(_.*?)\]\]/e',
>   "'[['.MakeSubPage(\$pagename,PSS('$1').' |
>'.PSS('$1').']]'");
>
>function MakeSubPage($pagename,$subpage) {
>  $parent = preg_replace('/_.*$/','',FmtPageName('$Name',$pagename));
>  return "$parent$subpage";
>}
>
>Will this help solve the immediate problem?
>-- 
>JR
>--
>John Rankin
>
Experimenting with this, I ran into a problem with markups other 
than '_' (which I don't particularly like). There are several
variables which have to be modified to allow new characters in
page names, but I seem to be missing one magic ingredient!

I tried [[*Subpage]] but the references all come back as the '/' 
empty page. I changed the list of allowed characters and the 
format of page names, but I am clearly missing something...
-- 
JR
--
John Rankin





More information about the pmwiki-users mailing list