1. Improved tags

    Tagging content can be useful to simply give posts some context but it can also be very useful when you need to mark items in order to use them in complex applications.

    We are currently using such a feature to mark any element in the application as a “resource” that needs to be reserved in advance. For example if you want to organize a meeting, you might want to block the room for the whole day, use the projector during the afternoon and need to make sure Albus Dumbledore is actually available to lead the meeting.

    Anyway, we have enhanced the input syntax to better support setting a specific tag:

    <r:input type='checkbox' name='tagged[resource]'/>
    <input type='hidden' name='tagged[resource]' value=''/>

    You need the second, hidden field to set a default value if the checkbox is not checked. In this case we use the empty value ”” to remove the tag.

    You can also “remove” tags by prefixing a value with ”-” when setting “tag” pseudo attribute, but I’m not sure this is a great idea…

    macho: <r:input type='checkbox' name='tag' value='misogyne, -sex_bomb, -sweet, alcoholic'/>

    Gaspard Bucher

    comments

    1. leave a comment