On 13.09.2010 20:28, fermulator wrote:
> Hoping someone can chime in and help me out.
> 
> Consider the following Wiki hierarchy structure
> 
> /RootPage/Foo
> /RootPage/Foo/Bar
> /RootPage/Foo/Bar/PageOne
> /RootPage/Foo/Bar/PageTwo
> /RootPage/Foo/Bar/PageThree
> /RootPage/Foo/Bat
> /RootPage/Foo/Stuff
> /RootPage/Foo/OtherStuff
> 
> GOAL: For some pages, I want to list all of the IMMEDIATE children
> pages, but NO grandchildren pages.  I have accomplished this with the
> "PageList" macro and a regular expression:
> 
> On "/RootPage/Foo", I have the following:
> {{{
> <<PageList(regex:^RootPage/Foo/[^\/]+$)>>
> }}}
> 
> This basically says, match anything starting with "RootPage/Foo/" ...
> then match ANY character, ANY number of times, EXCEPT the "/"
> character.  By using "/" as the exception, I'm guaranteed to never have
> any "child pages" deeper than 1 level in the list.
> 
> Result: a list of:
> /RootPage/Foo/Bar
> /RootPage/Foo/Bat
> /RootPage/Foo/Stuff
> /RootPage/Foo/OtherStuff
> 
> Great.
> 
> I can do the same thing on the "Bar" page, to list all children:
> {{{
> <<PageList(regex:^RootPage/Foo/Bar[^\/]+$>>
> }}}
> 
> Result: a list of:
> /RootPage/Foo/Bar/PageOne
> /RootPage/Foo/Bar/PageTwo
> /RootPage/Foo/Bar/PageThree
> 
> OK.
> 
> Now ... as soon as I added an attachment to any of the sub-pages ... my
> solution was not so clean.
> 
> consider:  Attach a file "myfile.jpg" to PageOne.
> 
> Now, all of a sudden, my "clean immediate child-only" list ... exploded
> and starts to show attachments!
> Result: a list of:
> /RootPage/Foo/Bar/PageOne (myfile.jpg)
> /RootPage/Foo/Bar/PageOne
> /RootPage/Foo/Bat
> /RootPage/Foo/Stuff
> /RootPage/Foo/OtherStuff
> 
> Problem:
>  * I don't want PageList to show attachments.  the regexp that I created
> should theoretically stop this... but it's not.  (technically, given the
> name of "PageList", I would consider it a bug that it lists
> attachments...but I'd be happy with a regex fix too)

use the mimetype parameter

>  * I tried with another macro "FullSearch" and/or "FullSearchCached",
> but the same problem exists.
>  * It /appears/ that PageList and FullSearch don't apply their regexp to
> attachments in the path?....
> 
> Any ideas on how to accomplish what I'm trying to do? (without showing
> attachments...)

see also http://moinmo.in/MoinMoinBugs/PageListTooVerbose

cheers
Reimar


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Moin-user mailing list
Moin-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/moin-user

Reply via email to