From 74d99b0063408f01f1c0d7aa26918ba6c98e17ac Mon Sep 17 00:00:00 2001 From: smcv Date: Sun, 14 May 2017 06:49:54 -0400 Subject: [PATCH] Added a comment: you can't use and/or/! inside the page() parameter, move them outside --- ..._5fef3835d207c454f4642879bdca7d9b._comment | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 doc/forum/Limit_pagespec_to_a_certain_depth/comment_2_5fef3835d207c454f4642879bdca7d9b._comment diff --git a/doc/forum/Limit_pagespec_to_a_certain_depth/comment_2_5fef3835d207c454f4642879bdca7d9b._comment b/doc/forum/Limit_pagespec_to_a_certain_depth/comment_2_5fef3835d207c454f4642879bdca7d9b._comment new file mode 100644 index 000000000..8e59e1238 --- /dev/null +++ b/doc/forum/Limit_pagespec_to_a_certain_depth/comment_2_5fef3835d207c454f4642879bdca7d9b._comment @@ -0,0 +1,28 @@ +[[!comment format=mdwn + username="smcv" + avatar="http://cdn.libravatar.org/avatar/0ee943fe632ff995f6f0f25b7167d03b" + subject="you can't use and/or/! inside the page() parameter, move them outside" + date="2017-05-14T10:49:53Z" + content=""" +`page(x)` interprets _x_ as a glob (a wildcard pattern like the ones in Unix and DOS, +with `*` and `?` as special characters), not as a full pagespec. I think you want: + + page(*) and !*/* + +which is shorthand for + + page(*) and !glob(*/*) + +The only difference between `page` and `glob` is that `glob` accepts both +(HTML) pages and attachments, while `page` only accepts pages. For instance on +ikiwiki installations that use the standard basewiki, + + [[!map pages=\"glob(*)\"]] + +matches both [sandbox](/sandbox/) (a page) and [style.css](/style.css) (an +attachment at the top level), while + + [[!map pages=\"page(*)\"]] + +matches [sandbox](/sandbox/) but not [style.css](/style.css). +"""]] -- 2.39.2