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 are 4 items 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`button_css: 'padding: 0.2em;'` css to style your button, feel free to colorize of move it around
31
32`button_up_value: ▲` the value shown in the button when clicking will collapse the list
33
34`button_down_value: ▼` the value shown in the button when clicking will unfold the list
35
36#### new in 2020:
37you can pass the config to every single instance:
38
39```
40<foldablelist collapse_after=2>
41  * list item 1
42  * list item 2
43  * list item 3
44</foldablelist>
45```
46this will show only the first 2 items
47
48#### new in 2022:
49
50added config-options for CSS and separate Button-Up and Button-Down
51
52foldablelist will now work with ordered lists (ol) too ;-)
53
54
55## why use?
56people like to put "important stuff" on startpage and the department i work in is not different.
57Things considered "important" get written on startpage, usually as lists (upcoming meetings, changes in workflow, new orders by the boss ...)
58and each list naturally grows as new items are added on top but older items remain important enough to keep them..
59
60Our startpage has grown to a length of 4 screen-pages by now because of that, so sooner
61or later my boss asked me to reduce the visible number of items on those lists to
62a certain minimum.
63
64This plugin adresses the issue in a quick and cosmetic way:
65all information is still available, but (hopefully) less important stuff gets hidden by default.
66
67## great but i miss feature X
68Feel free to improve, share and debug!
69
70* send me feature requests
71* found a bug? please report at github
72* you are a programmer and want to improve the plugin?
73Go ahead --> fork, rewrite, enhance and extend..
74