Hi everybody!

I always had problems when setting the inline pagespec parameter, I thought I would learn and understand about it with the time, but still can't manage what should be trivial settings. In particular, I want to use the directive inline to list the content in some folder but not including some pages under that.

For example, I have a wiki, directly under the root, named /photo. Directly under /photo I have a folder named /photo/rsrc containing "resource" folders like img, script, style and so on (/photo/rsrc/img, /photo/rsrc/script, etc).

I don't want the user ever gets a directory listing, so in the folder /photo I have a "fake" page named /photo/rsrc.mdwn containing a meta directive redirecting the user to /photo. This way when the users enters the url "http://myweb.com/photo/rsrc" he is redirected to the main photo wiki page, this works fine. In the same sense, I have img.mdwn, script.mdwn "pages" inside /photo/rsrc/ to redirect the urls /photo/rsrc/img/ and /photo/rsrc/script/ to the photo wiki main page, these also works fine.

The issue arises when I want to list the photo wikis: the rsrc.mdwn, img.mdwn, and script.mdwn kind of fake "pages" appears in the list. Even worse, as I have this scheme iterated in the sub wikis inside the main wiki, I get all those fake pages (rsrc.mdwn, img.mdwn...) in the list of photo wikis. I have tried several ideas and either the inline list results empty or it contains the fake pages.

The fake pages appear in the list:
  pages="page(photo/*) and !page(photo/rsrc)"  ==> even the page photo/rsrc.mdwn is included in the list!

The list is empty:
  pages="page(photo/*) and !page(*/rsrc) and !page(*/rsrc/*)"
  pages="page(photo/*) and !page(photo/rsrc) and !page(photo/rsrc/*)"
  pages="page(photo/*) and !photo/rsrc.mdwn and !*/rsrc/*"
  pages="page(photo/*) and !photo/rsrc and !photo/rsrc/*"
  pages="page(photo/*) and !page(*/rsrc) and !*/rsrc/*"
  pages="page(photo/*) and !page(*/rsrc) and !rsrc/*"
  pages="page(photo/*) and !page(photo/rsrc) and !rsrc/*"
  pages="page(photo/*) and !page(*/rsrc)"

I have also tried tagging as internal the fake pages, but the fake pages keep appearing in the list:
  pages="page(photo/*) and !tagged(internal)"
  pages="page(/photo/*) and !tagged(internal)"  ==> the list results empty

Please, can anybody tell me what am I missing??

The best way to debug a pagespec is to use the http://ikiwiki.info/ikiwiki/directive/testpagespec/ directive to see why a page you want to match doesn't, or why a page you want to be excluded is matched by it.
Comment by joeyh.name Tue May 27 19:29:04 2014