5

I have two Categories, that I want to bind with two dropdown lists on a page. When selecting a value in the first dropdown, the second dropdown should be populated with the values from another Category. How can I map two Categories on runtime using SDL Tridion APIs?

  • 1
    Please post some code to show us what you've tried so far, and tell us which version of Tridion you are using. – Dave Houlker May 2 '13 at 7:12
  • Do have any more details on the problem please? For example, does the value (Keyword) selected in the first dropdown affect the options (Keywords) available in the second? If so, what is the logic behind this (e.g. Only display Keywords in the second dropdown that are associated with Components tagged with the value selected in the first)? – Jonathan Williams May 2 '13 at 8:36
  • when i select some value from 1st drop down some mapped value will be displayed on the another dropdown.Now i have confustion here ,is it possible to have this kind of functionalities by using single category and with its subkeywords or we need to have two separate categories for this. – roop May 2 '13 at 9:52
  • i m using sdl tridion sp1 2011 – roop May 2 '13 at 9:52
6

Yes, you can do this using a single Category and nested keywords.

Take a look at the API documentation, the online documentation (login required), forums and some other Stack Exchange questions for TaxonomyFactory, TaxonomyFilter and ExpandKeywords.

The online documentation (login required) describes the TaxonomyFilter as:

Calls a method which defines a filter for displaying only a part of the taxonomy.

| improve this answer | |
2

As per my understanding, you can do this way:

  1. First map the key's in the form of below representation

    • CAT A

      • Key A
        • Add RelatedKeyword as BA
      • Key B
        • Add RelatedKeyword as BB
      • Key C
        • Add RelatedKeyword as BC
    • CAT B

      • Key BA
      • Key BB
      • Key BC
  2. Now render the 'A' dropdown from CAT A and corresponding 'B' dropdown from RelatedKeywords
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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