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
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users