[pmwiki-users] wiki.d/ sub-sub-directories
Patrick R. Michaud
pmichaud at pobox.com
Sun Jan 21 10:31:53 CST 2007
On Sun, Jan 21, 2007 at 06:31:05AM +0100, Petko Yotov wrote:
> 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
>
> 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 :-))))
You figured it out exactly -- well done.
FWIW, the standard method I've been using for this is:
$FmtPV['$Group1'] = '$group{0}';
$WikiDir = new PageStore('wiki.d/$Group1/$Group/$FullName');
("$Group1" here means "first letter of $Group".)
Pm
More information about the pmwiki-users
mailing list