1# dokuwiki-plugin-foldablelist
2plugin that makes an unordered list invisible after n items
3
4## how to use?
5simply wrap an unordered list into the tags
6
7```
8<foldablelist>
9  * list item 1
10  * list item 2
11  * list item 3
12</foldablelist>
13```
14this list can be generated via markup or dokuwiki plugins like the tag-plugin.
15
16#### Advanced use
17```
18<foldablelist>
19{{topic>ns1:sub-ns?tag}}
20</foldablelist>
21```
22uses the tag plugin (topic component) to generate the list from all pages in the namespace ns1/sub-ns tagged with "tag"
23
24## configuration
25this plugin can be configured via dokuwikis admin config page
26So far there is only 1 item to configure:
27
28`collapse_after: 5` the number of list items to be displayed before hiding the rest of the list, default value: 5
29
30#### new in 2020:
31you can pass the config to every single instance:
32
33```
34<foldablelist collapse_after=2>
35  * list item 1
36  * list item 2
37  * list item 3
38</foldablelist>
39```
40this will show only the first 2 items
41
42## why use?
43people like to put "important stuff" on startpage and the department i work in is not different.
44Things considered "important" get written on startpage, usually as lists (upcoming meetings, changes in workflow, new orders by the boss ...)
45and each list naturally grows as new items are added on top but older items remain important enough to keep them..
46
47Our startpage has grown to a length of 4 screen-pages by now because of that, so sooner
48or later my boss asked me to reduce the visible number of items on those lists to
49a certain minimum.
50
51This plugin adresses the issue in a quick and cosmetic way:
52all information is still available, but (hopefully) less important stuff gets hidden by default.
53
54## great but i miss feature X
55Feel free to improve, share and debug!
56
57* send me feature requests
58* found a bug? please report at github
59* you are a programmer and want to improve the plugin?
60Go ahead --> fork, rewrite, enhance and extend..
61