Copied to clipboard

Flag this post as spam?

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


  • Heather Floyd 609 posts 1030 karma points MVP 6x c-trib
    Oct 07, 2014 @ 20:58
    Heather Floyd
    0

    Best way to handle tags in a multi-site structure?

    Considering architecture here...

    Given a multi-site setup, possibly even 2-levels deep (lang1.site1.com, lang2.site1.com, lang1.site2.com, lang2.site2.com) and an "Article" doctype with a Tag property, what is the best way to set up the architecture such that tags remain local to their site - both in the back-end (autocomplete in the property editor) and on the front-end for display?

    I have 2 scenarios in mind with different pros/cons:

    #1 - Single "Article" doctype with single Tag datatype used (using a tag group name of "ArticleCategory", for instance)

    • Pros:
      • Clean, simple, consistent
      • New sites can be added seamlessly
    • Cons:
      • Seems that all tags, being in the same tag group would be "shared" across all sites/subsites. - Is this true?

    #2 - Multiple site-specific "Article" doctypes with individual Tag datatypes used (using a tag group name of "Site1ArticleCategory","Site2ArticleCategory", etc. for instance)

    • Pros:
      • All tags are in separate tag groups, thus kept separate
    • Cons:
      • Ugh! Nasty to have bunches of similar datatypes/doctypes
      • Any new sites would require a new doctype/tag datatype to be created
      • Parent doctypes would need to be segregated as well, otherwise risking a content editor utilizing the "wrong" article doctype when creating a new content node

    Given my strong aversion to the "Cons" for option #2, it seems that option #1 is the best way to go, and I know that it could be handled on the front-end of the website (as per http://our.umbraco.org/forum/getting-started/questions-about-runway-and-modules/7901-Tags-for-multiple-language-site), so my main concern is the editor experience in the back-end.

    I suppose the ultimate solution would be an update to the Tags datatype which would support an option for limiting tags considered to be in the same group via a node level number. (So, for a simple single-level multi-site setup, using "1" would only grab tags defined in nodes with the same level 1 ancestor, and using "2" could handle the 2-level structure described above, filtering by the same level 2 ancestor.)

    Any thoughts?

    Thanks!

    ~Heather

  • Dave Woestenborghs 3504 posts 12134 karma points MVP 9x admin c-trib
    Oct 08, 2014 @ 07:58
    Dave Woestenborghs
    0

    Hi Heather,

    The tags property editor calls an api to retreive tags from the server when you type ahead.

    You could intercept this call to filter the tags based on language. Jeroen Breuer does something similar in the Hybrid Framework to set the start node of the media picker based on the current node.

    https://github.com/jbreuer/Hybrid-Framework-for-Umbraco-v7-Best-Practises/blob/master/Umbraco.Extensions/Utilities/WebApiHandler.cs

    I don't if it will work, but maybe it's worth giving a shot.

    Dave

  • shinsuke nakayama 109 posts 250 karma points
    Nov 03, 2014 @ 13:48
    shinsuke nakayama
    0

    Hi Heather

    I've just gone through similar scenario with what you went through. I know that your issue was raised a month ago, but i thought i'll share my experience.

    My issues were:

    • Tag Group function is broken in V7.1.8
    • How to Search by keyword and Tag Search in Multi site

    Tag Search

    In my scenario, i had document type of "FilmType", "NewsType", and "BookType".

    What i initially did was implemented group tag and separate each Tags by group.

    However during the testing phase i found out that the Group Tag doesn't work (well at least in Version 7.1.8), and it was multiplying the result everytime when i was adding entries.

    Ref: http://our.umbraco.org/forum/ourumb-dev-forum/bugs/57473-Tag-Group-doesnt-seems-to-be-working-on-Umbraco-718

    -

    Search and Tag search in Mutli Site

    Then i came across another issue with search and tag search. Everytime when i was searching by keyword or tags, i was getting results from different site.

    My solution was to setup examine indexing for each site, so each site has its own search index. Then i setup search method for keyword search and Tag search.

    You can find my answer here (this is for keyword search, for tag search, i just search for the "Tags" field, instead of everything) http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/57812-Umbraco-7-Search-and-Multi-Language-website?p=0

    I don't have a code with me right now but if you want me to post my code, let me know and i'm happy to do so.

    Cheers

    Shinsuke

  • Heather Floyd 609 posts 1030 karma points MVP 6x c-trib
    Nov 03, 2014 @ 15:57
    Heather Floyd
    0

    I haven't gotten around to finishing the architecture on this site yet, so I appreciate the additional feedback.

    Thanks, Dave, for the tip on how it might be possible to create the "site-specific" tag editor control. Perhaps I'll try that.

    Shinsuke, Thanks for the warning about Tag groups - another reason that my Option #2 scenario wouldn't be ideal! I'll have to look into the Search methods you have mentioned.

    ~Heather

  • Murray Roke 503 posts 966 karma points c-trib
    Feb 09, 2016 @ 02:28
    Murray Roke
    0

    We had a similar issue in the umbraco 4.x days and we used sniper tags https://our.umbraco.org/projects/backoffice-extensions/sniper-systems-tags-control/ (which has an event you can wire up to set the tag GroupName)

    I think the best solution would be to have such an event included in the umbraco core. (created request here: http://issues.umbraco.org/issue/U4-7921 )

Please Sign in or register to post replies

Write your reply to:

Draft