Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kev 16 posts 67 karma points
    Sep 28, 2013 @ 00:21
    Kev
    0

    How do you filter nodes in front-end with multiple tags (checkbox lists)

    I've only started using Umbraco about a week ago, so I'm quite new to this.

    Summary of my problem:

    I'm creating a site which has a number of events – each event can be "tagged" with criteria such as:

    • Activity
    • Distance
    • Terrain

    Each of the categories above have multiple "tags". (I'm using pre-defined checkbox lists.)

    The user should be able to filter on a number of these at once – for example an activity and distance or even multiple activities.

    What is the best way to approach this kind of filtering?

    I've had a look through – http://our.umbraco.org/forum/developers/razor/22902-Tags-example – which is mostly working.

    • Can this be built upon for my needs?
    • Is there a better solution?

    Thanks in advance.

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Sep 30, 2013 @ 10:52
    Jeavon Leopold
    0

    Hi Kev,

    It's a very good question, generally the approach in the post you linked to is correct. However, I personally prefer to use the uTagsy package which is a standalone component from uBlogsy

    The real question comes into play is how do you select all nodes that have a certain tag when the data is saved as csv, this is where the helper methods that exist with the core tag property editor help out.

    With uTagsy you can inject the nodeId's into a Examine index, this is what is done with uBlogsy and it's probably the "best" approach, but it is complicated, otherwise you just have to iterate the collection and check each item. See here for more info.

    Hope that's some useful info?

    Jeavon

  • Kev 16 posts 67 karma points
    Sep 30, 2013 @ 20:43
    Kev
    0

    Hey Jeavon,

    I'll take a look at uTagsy & iterating through the collection as there'll be a relatively small amount of events. Examine does feel a little overkill for me at this stage, but good to know it's an option.

    Thanks a bunch for the reply – it's definitely helpful.

    Kev

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Sep 30, 2013 @ 21:17
    Jeavon Leopold
    0

    Cool, actually an interesting idea would be to hook uTagsy up to the relations system then you would have real links from nodes to tags (which are also nodes). I will think about that one ;-)

  • Matt 91 posts 237 karma points
    Oct 02, 2013 @ 11:28
    Matt
    0

    I'm also trying to achieve similar functionality filtering products - I've used dropdown multiple at the moment but will look into tags.

    The problem I'm having is understanding how I update the current products live (AJAX?) when a checkbox is ticked.

    I.e. Current page shows red products, user checks blue and all products with the tag blue are also showed.

    Any ideas? :)

  • BenH 59 posts 199 karma points
    Dec 17, 2014 @ 18:40
    BenH
    0

    Bump

Please Sign in or register to post replies

Write your reply to:

Draft