0

We need to have sync between two categories in an environment. There are two categories say cat1 and cat2. when ever we make a change to a keyword in cat1 same change should be reflected in cat2 and vice versa.

How can we keep the keywords in these two categories in sync?

6
  • And the question is? Have you tried doing it with event system? May 6, 2014 at 10:58
  • 4
    Another question is, why do you need to do it at all? Can't you just use one category? May 6, 2014 at 11:00
  • Our business scenario is to have two different categories and have sync between them. Can this be achieved using event system? Can content porter be used to port content within same environment bewteen two categories
    – user1037
    May 6, 2014 at 11:16
  • 1
    I understand where you're coming from, but seriously I find it hard to understand the requirement to have 2 categories with the same data instead of using 1 category only. As others suggested, Event System is the way to go
    – Nuno Linhares
    May 6, 2014 at 12:49
  • 1
    Content Porter could be used by either renaming and/or remapping the Category paths. Another approach to use the same set of keywords in different contexts is through BluePrinting. +1 to the other points--duplicate sets of keywords is more of an implementation solution rather than a business requirement. Since you can easily use the same set of keywords for different fields with different field names I don't see a compelling reason to do this. What are cat1 and cat2 really called? May 6, 2014 at 22:43

3 Answers 3

9

I am not really sure, why one would ever want to create two different categories with the same(duplicate) keywords?

but If you are absolutely sure and really want to do it, use event system .

3

As with Saurabh - I'm intruguied to understand the use case/business reason for such a request, but anyway:

You could use the the Core Service to set the details for the Keyword if using metadata remember you'll need to populate the Metadata property in your Keyword with the appropriate XML. If this route was taken you'd need to think of how/when the code would be triggered to perform the action (e.g. batch 'maintenance' overnight / custom page with trigger etc.) ... or, probably more appropriately...

You could subscribe to the Keyword Save event and use an Event Handler to do this also; Meaning that code could be automatically executed.

[UPDATE] for some reason I hadn't seen Saurabhs response - I'll leave this just for the consideration of Core Service approach as we don't know the business requirements / environment etc.

1

Perhaps a custom page in which the editor can create a new Category

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.