[pmwiki-users] Hg tweaks...
Sivakatirswami
katir at hindu.org
Sat Feb 3 13:38:52 CST 2007
> Sivakatirswami, hope you are reading this. I know you've been asking
> for this repeatedly...
Indeed, I'm following this VERY closely. First let me say thank you so
much for your hard work on this...you have solved some huge
problems for me here.. .I can finally merge all my fields!
That's just "huge-awesome" as the kids say.
All theoretical discussions aside about whether this is or is not
"real" hierarchical groups; it really works and it really works well.
In some ways I would might prefer to have the
$Group[hyphen]Subgroup.$Name
format remain unchanged. Ugly from one point of view,
but seeing
Kingdom-Canine-Poodle.Grooming
Kingdom-Plant-Palms.SeedCollection
is SO obvious! I'm not sure I might not get lost
with /Kingdom/Plant/Palms/SeedCollection
What "$FullName" be for such a page?
Is this subgroup page "stripper"mark up the latest?
Thanks again
Sivakatirswami
> Aha!
>
> For those interested I finally came up with a solution to this--by
> writing my own stripper markup. Works great, and seemingly much
> simpler than the basename patterns idea--though admittedly not as
> smart. (I'd be open to ideas for improving it...)
>
> Basically, I added another zap var markup with this code:
>
> Markup('zapstrip','<if','/\\{\\#h (.*?)\\}/e', 'zapstrip("$1")');
> function zapstrip($x) {
> $xx = explode("|", $x);
> $x = substr($xx[1], strlen($xx[0]));
> return $x;
> }
>
> Then I created this pagelist template:
>
> [[#hggroup]]
> (:if ! equal {=$Group} {<$Group}:)
> (:input select subgroup '{#h {$$strip}|{=$Group}}':)
> [[#hggroupend]]
>
> What does this do?
>
> Given wiki pages:
>
>> > > Main-One.A
>> > > Main-One.B
>> > > Main-Two.A
>> > > Main-Two.B
>
> I can type (:pagelist group=Main-* strip=Main- fmt=#hggroup:) and
> produce a pull down menu consisting of options One and Two--just what
> I wanted. Combined with ZAP and the subgroup vars, this can be used
> to create pages at just the right place in a hierarchy automatically.
> Really cool...
>
> Suppose I could do a strip right also if needed...
>
>
> Cheers,
> Dan
>
--
Om shanti
(In Peace)
Sivakatirswami
www.himalayanacademy.com
Get Hinduism Today Digital Edition. It's Free!
http://www.hinduismtoday.com/digital/
More information about the pmwiki-users
mailing list