Description
Somehow it might be convenient to hide the default page options and present only selected buttons to the users. The syntax for it is:
[[button type options]]
Where the type is:
- edit
- edit-append
- edit-sections
- history
- files
- tags
- source (view page source)
- backlinks
- talk — works similar as in MediaWiki/Wikipedia, e.g. links to the talk: page (if someone wants it)
Possible attributes are:
- text — alternative text to be displayed
- class — CSS class of the A element
- style — CSS style definition
Code
For some nice "view source" and "print" buttons with icons you can use the following code:
[[>]]
[[button source style="background-image: url(http://www.wikidot.com/local--files/files/view-source.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px; color: #444"]]
[[button print style="background-image: url(http://www.wikidot.com/local--files/files/document-print.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px;color: #444"]]
[[/>]]
to get:
A very nice set of icons can be found at the Tango Project.
Another Example
The following code creates four buttons with a very brief text description:
[[button edit text="edit" style="background-image: url(http://community.wikidot.com/local--files/nav:side/accessories-text-editor-32x32.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px; color: #444"]] [[button edit-sections text="sec" style="background-image: url(http://community.wikidot.com/local--files/nav:side/accessories-text-editor-32x32.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px; color: #444"]] [[button source text="src" style="background-image: url(http://www.wikidot.com/local--files/files/view-source.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px; color: #444"]] [[button print text="prt" style="background-image: url(http://www.wikidot.com/local--files/files/document-print.png); background-repeat: no-repeat; background-position: bottom right; padding-right: 20px;color: #444"]]
This set of four buttons will fit nicely into most sidebars:
Some speculations
You can use the buttons in a number of ways — e.g. if you want to make clear that your pages are Wiki pages (editable by anyone) — you can place a large edit button somewhere in the side bar. You could also add buttons to the nav:top bar.
With option text="Imprimer" you can translate "print" into French.
With option text=" " the icon appears alone, without text.
Or you could hide the default options at the bottom of each page and present only your hand-made buttons. If you decide to use icons (via the CSS option background-image as shown above) you could ultimately tweak your Wiki! ;-)
Rate this solution
If you think this solution is useful — rate it up! Or dump it otherwise.






Comments
Thanks for these buttons.
However, I got non user-friendly error messages when using buttons on a page being created.
Consider this page:
Error was (when using button print on left side):
Also, button types [[button edit-append]] , [[button edit-sections]] were not recognized.
Aide Wikidot en Français ? Handbook !!!
This is fixed now.
Michał Frąckowiak @ Wikidot Inc.
Visit my blog at michalfrackowiak.com
how about go-top go-home buttons? I can't add them - they are not recognized or maybe I'm doing something wrong
go-top and go-home are not recognized. Look at the list above for the possibilities, or they are here:
CycloDS.tk - Firmware, skins, homebrew reviews and downloads for the CycloDS
I'm trying to add the discuss button, but keep getting a "The button type is not recognized" error.
What's the type of the discuss button?
talk
CycloDS.tk - Firmware, skins, homebrew reviews and downloads for the CycloDS
Hello,
I'd quite like to use buttons (i.e. clickable images) to link to pages in my wiki, this is to increase accessibility for dyslexics and speakers of other languages.
There doesn't seem to be a type for that.
I'm stuck with just putting text links underneath images, and the " _ " option in tables doesn't seem to work.
Jack
Try this:
Then alter as needed.
CycloDS.tk - Firmware, skins, homebrew reviews and downloads for the CycloDS
I want to use it because it frequency use for my wiki.
I'd also love to see the parent button added to the list.
I think I found what I was looking for over here: http://www.wikidot.com/doc:backlinks-module
I' leaving my original question here in case anyone else ends up here with the same question. Feel free to delete it if that's more appropriate, thanks.
Add your comment
Add a new comment