Copied to clipboard

Flag this post as spam?

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


  • Simon 81 posts 184 karma points
    Oct 13, 2016 @ 16:54
    Simon
    0

    Limiting Tags values

    On our website, it is possible to tag content by a country list. This country list could be implemented as a tag control but I'm concerned about mis-spellings creeping in over time. However, the country list is very long (150+) so not ideal for a dropdown multiple control either.

    What I'm looking to do is have a control that has the same type + autocomplete functionality as the existing tags control but limit the possible values to those retrieved from a database table.

    I also want to be able to list all tags that a piece of content has been tagged against as well as searching for content based on tags e.g. GetNodesWithTags

    Has anyone developed anything like this before? I've had a look at packages etc but can't see anything similar. Does anyone have any advice before I start off?

    Many thanks Simon

  • Marcin Zajkowski 112 posts 585 karma points MVP 7x c-trib
    Oct 14, 2016 @ 10:24
    Marcin Zajkowski
    1

    I probably answered yours question on Stack Overlow? :)

    But let me also place the answer here.


    Definitely, using Tags datatype for this may cause a lot of problems :)

    In my opinion, the perfect solution will be to use nuPickers (https://our.umbraco.org/projects/backoffice-extensions/nupickers/) package and available there TypeaheadList Picker.

    Depending of your additional requirements, you may use Lucene index / C# accessed source (totally custom - db, static, enum etc.) / XML file source as a prevalues for your control.

    enter image description here

    Then, you'll be able to create logic which will enable you to perform search based on this field as it will be a typical property with value on the nodes. Once again - suggested way is to use Lucene Examine index as it's tailored to be fast with searching. You can read more about searching with Examine here: https://our.umbraco.org/documentation/reference/searching/examine/.

    Hopefully it will solve your problem.

  • Simon 81 posts 184 karma points
    Oct 19, 2016 @ 11:32
    Simon
    0

    Thanks Marcin - went with the DotNet provider in the end, even though it's from a SQL Server table as then I can use the HttpContext.Cache object to speed up the loading

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies