]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/bugs/map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn
how I do this
[git.ikiwiki.info.git] / doc / bugs / map_sorts_by_pagename_and_not_title_when_show__61__title_is_used.mdwn
1 The [[ikiwiki/directive/map]] directive sort by pagename. That looks kind of odd, when used together with show=title. I would expect it to sort by title then.
3 > This would be quite hard to fix. Map sorts the pages it displays by page
4 > name, which has the happy effect of making "foo/bar" come after "foo";
5 > which it *has* to do, so that it can be displayed as a child of the page
6 > it's located in. If sorting by title, that wouldn't hold. So, map
7 > would have to be effectively totally rewritten, to build up each group
8 > of child pages, and then re-sort those. --[[Joey]] 
10 >> Ok, you are right, that does would break the tree. This made me think that I do not
11 >> need to generate a tree for my particular use case just a list, so i thought i could use [[ikiwiki/directive/inline]] instead.
12 >> This created two new issues:
13 >>
14 >> 1. inline also does sort by pagename even when explicitly told to sort by title.
15 >>
16 >> 2. I cannot get inline to create a list when the htmltidy plugin is switched on. I have a template which is enclosed in an li tag, and i put the ul tag around the inline manually, but htmltidy breaks this. --martin
18 >>>> You might want to check if the [[plugins/contrib/report]] plugin solves your problem.  It can sort by title, among other things. --[[KathrynAndersen]]
20 >>>> I realise OP posted this 10 years ago, but here's how I do it: I generate <https://jmtd.net/log/all/> using
21 >>>> `inline` with `archive=yes` and a custom template which defines the LI element content for each post. I then include
22 >>>> these inlines (one per calendar year) via *another* template, which has the wrapping UL elements in it. These
23 >>>> templates are `.tmpl` files (and live in my custom `templatedir`, although that might not matter) which means
24 >>>> they avoid the htmlscrubber. *— [[Jon]], 2020-04-27* 
26 >> See also: [[todo/sort_parameter_for_map_plugin_and_directive]] --[[smcv]]