]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/forum/Limit_pagespec_to_a_certain_depth/comment_2_5fef3835d207c454f4642879bdca7d9b._comment
Added a comment: you can't use and/or/! inside the page() parameter, move them outside
[git.ikiwiki.info.git] / doc / forum / Limit_pagespec_to_a_certain_depth / comment_2_5fef3835d207c454f4642879bdca7d9b._comment
1 [[!comment format=mdwn
2  username="smcv"
3  avatar="http://cdn.libravatar.org/avatar/0ee943fe632ff995f6f0f25b7167d03b"
4  subject="you can't use and/or/! inside the page() parameter, move them outside"
5  date="2017-05-14T10:49:53Z"
6  content="""
7 `page(x)` interprets _x_ as a glob (a wildcard pattern like the ones in Unix and DOS,
8 with `*` and `?` as special characters), not as a full pagespec. I think you want:
10     page(*) and !*/*
12 which is shorthand for
14     page(*) and !glob(*/*)
16 The only difference between `page` and `glob` is that `glob` accepts both
17 (HTML) pages and attachments, while `page` only accepts pages. For instance on
18 ikiwiki installations that use the standard basewiki,
20     [[!map pages=\"glob(*)\"]]
22 matches both [sandbox](/sandbox/) (a page) and [style.css](/style.css) (an
23 attachment at the top level), while
25     [[!map pages=\"page(*)\"]]
27 matches [sandbox](/sandbox/) but not [style.css](/style.css).
28 """]]