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