[pmwiki-users] wiki.d/ sub-sub-directories
Petko Yotov
5ko at free.fr
Sat Jan 20 23:31:05 CST 2007
On Sunday 21 January 2007 06:14, Petko Yotov wrote:
> My idea was to split the $Group directories inside a directory named by
> its' first letter: like:
> Main.HomePage -> wiki.d/M/Main/Main.HomePage
> Site.SomePage -> wiki.d/S/Site/Site.SomePage
>
> So, I was trying this code:
> $pagename = ResolvePageName($pagename);
> $group = PageVar($pagename, '$Group');
> $FmtPV['$G0'] = "'".$group{0}."'";
> $WikiDir = new PageStore('wiki.d/{$G0}/$Group/$FullName');
>
> And while it saves the page correctly in /M/Main/ directory, it also saves
> the page Site.AllRecentChanges there (instead of in /S/Site/). When I edit
> the Site.SideBar, the newly saved SideBar version is only visible from the
> Site group.
I made it work!!!!
First tried with a finction
function FirstLetter($x){return $x{0};}
$FmtPV['$G0'] = 'FirstLetter($group)';
But then I tried just this:
$FmtPV['$G0'] = '$group{0}';
and it works :-))))
Greetings,
Petko
More information about the pmwiki-users
mailing list