]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/contrib/addtag.mdwn
New plugin: addtag
[ikiwiki.git] / doc / plugins / contrib / addtag.mdwn
1 [[!template id=plugin name=addtag author="[[Louis|spalax]]"]]
2 [[!tag type/widget]]
3
4 # Addtag
5
6 This plugin adds links in the edit page to tag pages by clicking on tag links (instead of manually typing the tag directive).
7
8 ## Template
9
10 The editpage template has to be modified to enable this: the following code has
11 to be inserted where you want this feature to appear (right after the
12 attachment link seems a good place).
13
14 [[!toggle id=template text="Template"]]
15 [[!toggleable id=template text="""
16     <TMPL_IF NAME="ADDTAG">
17     <a class="toggle" href="#addtag">Tags</a>
18     <TMPL_VAR ADDTAG>
19     <span class="addtag">
20     <div class="toggleable" id="addtag">
21     <em>
22     Enable Javascript to add tags by simply clicking on them.
23     </em>
24     </div>
25     </span>
26     </TMPL_IF>
27 """]]
28
29 ## CSS
30
31 I think that in this case, the tag list looks nicer as columns. To do so, add
32 the following code to your CSS.
33
34 [[!toggle id=css text="CSS"]]
35 [[!toggleable id=css text="""
36     .addtag:after {
37       clear: both;
38       content:".";
39       display:block;
40       height:0;
41       visibility:hidden;
42     }
43     
44     .addtag ul{
45       margin: auto;
46       padding: 0;
47     }
48     
49     .addtag ul li {
50       list-style: none;
51       float: left;
52       margin-left: 1.5em;
53     }
54     
55     .addtag ul ul{
56       margin: 0;
57       padding: 0;
58     }
59     
60     .addtag ul ul li {
61       clear: left;
62       list-style-type: disc;
63     }
64     
65     .addtag ul ul ul li {
66       list-style-type: circle;
67     }
68 """]]
69
70 ## Code
71
72 Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Addtag]].