]> sipb.mit.edu Git - ikiwiki.git/blob - doc/ikiwiki/directive/map/discussion.mdwn
Merge remote branch 'davrieb/autotag' into autotag
[ikiwiki.git] / doc / ikiwiki / directive / map / discussion.mdwn
1 ### Sorting
2
3 Is there a way to have the generated maps sorted by *title* instead of *filename* when show=title is used?
4 Thanks 
5
6 -- Thiana
7
8 > [[bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used]] --[[Joey]] 
9
10 ----
11
12 Question: Is there a way to generate a listing that shows *both* title and description meta information? Currently, a \[\[!map ...]] shows only one of the two, but I'd like to generate a navigation that looks like a description list. For example:
13
14  * This is the title meta information.
15
16    This is the description meta information
17
18  * This is another title.  
19
20    And so on ...
21
22 Is that possible?
23
24 --Peter
25
26 ----
27
28 The site I'm trying to set up right now (not really a wiki - no public editing) is divided into topics.  Topics are pages that have `\[[!meta link="/topic"]]`.  Topic pages contain an index of their subpages (done with `\[[!inline]]`); the subpages are the real content.  I want a map in the sidebar that lists:
29
30  * all of the topics;
31  * all of the first-level subpages of the *current topic only*.
32
33 That is, if the current page is "Topic A" or "Topic A/Page 1", then the map should look like
34
35     Topic A
36         Page 1
37         Page 2
38         Page 3
39     Topic B
40     Topic C
41
42 but if the current page is "Topic B" or one of its subpages, then the map should look like
43
44     Topic A
45     Topic B
46         Page 1
47         Page 2
48         Page 3
49     Topic C
50
51 On the top-level index page, or on any other page that is neither a topic nor a subpage of a topic, the map should list only the topics.
52
53 Is there any way to do that?  I don't mind mucking around with `\[[!meta]]` on every page if that's what it takes.
54
55 -- Zack
56
57 > I think that you're looking for this:
58
59 > `pages="((Topic*/* or Topic*) and ./*) or (Topic* and ! Topic*/*)"`
60
61 > Let's pull that [[PageSpec]] apart. 
62
63 > * `(Topic*/* or Topic*)` matches all pages that are underneath a Topic
64 >    page or are a topic page themselves.
65 > * `and ./*` further adds the limitation that the pages have to be
66 >   in the same directory as the page that is displaying the map. So,
67 >   for `Topic_A/Page_1`, it will match `Topic_A/*`; for `Topic_A`,
68 >   it will match `Topic_*` but not subpages.
69 > * Finally, `Topic* and ! Topic*/*` matches all the toplevel topic pages,
70 >   since we always want those to show up.
71
72 > I haven't tested that this works or displays, but I hope it gets you
73 > on the right track. PS, be aware of
74 > [[this_sidebar_issue|todo/Post-compilation_inclusion_of_the_sidebar]]!
75 > --[[Joey]]
76
77 >> Thanks, but this assumes that topic pages are named `Topic<something>`.
78 >> They aren't.  They are tagged with `\[[!meta link="/topic"]]`, and as
79 >> far as I can tell there is no [[PageSpec]] notation for "subpages of a
80 >> page that satisfies link(foo)"...
81 >> -- Zack
82
83 >>> I think that the ideas and code in
84 >>> [[todo/tracking_bugs_with_dependencies]] might also handle this case.
85 >>> --[[Joey]]