pieterh wrote on 02 Feb 2010 11:55
This is a design sketch for the settag command, which automates the task of setting tags on pages. It is analogous to iftag but shows a button or text link that the user can click. The concept was originally suggested by James Kanjo in his design
The tag button automates a very common scenario:
- Navigate to a page
- Click on the 'tags' action
- Remove unwanted old tags
- Add wanted new tags
- Save resulting tags
- Enter comment text
- Save comments
- Return to parent page
It would become:
- Click on tag button
- Enter comment text
- Save comment
Syntax:
[[settags arguments...]]
Arguments:
- button="text string" — specifies the text for the button, which is the 'tags' argument by default.
- class="css-class" — specifies CSS class for the div element containing the button, allowing custom styling
- iftags="taglist" — only shows if this tag condition is true
- tags="taglist" — specify new tags to set, by default is empty
- remove="taglist" — specify tags to remove, where '*' is a wildcard. So "_*" means remove all hidden tags.
- comment="yes|no" — if 'yes', Wikidot asks for a page comment and only retags if the comment is saved, by default is "no"
- source="pagename" — if specified, this page will be tagged, otherwise it is the current page
- target="pagename" — if specified, the user is moved to this page after tagging is completed
The iftags argument works exactly as the [[iftags]] command.
Example:
[[settags button="Close" tags="_closed" iftags="-_closed" source="%%fullname%%" target="product:_start" comment="yes" remove="_*"]]
Settags with custom styling:
[settags class="my-settags-class"]]
If you use custom styling, remember to define the class in your custom CSS. The default class for settags is ".settags" and you can style this using custom CSS like this:
.settags { background-image: url(yourimage.png) }
Consistency of style on buttons | By Gabrys | 2 Comments | 02 Feb 2010 15:57 |
Name of the settag button (closed) | By pieterh | 1 Comments | 02 Feb 2010 11:56 |
We discourage direct comments on this thread: to discuss it, please start a sub-thread.
Hey Pieter, have you seen my design for this? I made it as a draft on your blog a couple of months ago…
I reckon my ideas of the whole "add", "minus" and "invert" upon clicking the button was pretty damn good, because clicking the tag button will do multiple things in a logical sense at once.
I'd forgotten about it. Anyhow the minus approach is no good because it assumes certain states. E.g. _open. But an issue could be in many states. Meaning the 'minus' needs to cover all possible states and be modified over time.
Portfolio
A page contains the following tags: science, animal, anatomy
I have a tags module: minus="animal frog"
If I click on the tags module, it will remove the tags "animal" and "frog". However, frog is not part of the page's current tags, therefore nothing happens in terms of frog (animal is still removed).
Not sure what you mean…
If you have tags like _open, _in_progress, _closed, _cancelled and then you start adding tags over time, you have a maintenance problem. It's easier to say "remove everything and set these new tags".
That could work with 'minus="*"'… ok, thinking about your suggestion.
Portfolio
Okay, I know what you're talking about now.
I designed the tags module with Wikidot applications in mind… so I was only thinking of structural tags, which are manageable.
But yes, as the tagging feature is designed to tag pages (not for internal structure), we definitely need a way to remove all tags.