4

Thinking about a language selector drop-down on a site with multiple languages and was wondering if this could dynamically determined via the publication hierarchy in our Blueprint from the CD API?

Secondary language publications inherit from a primary language publication - if I could detect this in the API I could drive out a language selector that could be nicely tied into when a site is actually published.

3
  • Although the API doesn't support this, you could achieve it with a clever numbering system. With the CD API you then get all PublicationMeta (which includes the Publication title).... Commented Oct 8, 2014 at 13:16
  • Good point - we already use numbering to order the child publications beneath their parents - this number could be extended to indicate which parent as well I guess.
    – Neil
    Commented Oct 9, 2014 at 8:40
  • Related to language switching is which page to switch to. There's an approach hinted at in the Tridion Reference Implementation in page Home/System_/include/Header. The Language Selector Configuration Component has a field for: "Default content to link to if there is no equivalent page in the selected language (if blank language home page will be used)." Commented Oct 10, 2014 at 7:11

1 Answer 1

4

I don't believe this is possible via the CD API since it is designed to work within a specific context publication. However, you can publish your own hierarchy in form of XML similar to the concept of publishing PageList.xml for SG-based navigation.

Also check out this post on language switchers in Tridion: http://www.tridiondeveloper.com/tridion-language-switcher

1
  • Thought as much. Might have been nice if the PublicationMeta class could have held a TCM to its immediate parent(s) and child(ren) pubs.
    – Neil
    Commented Oct 8, 2014 at 13:11

Your Answer

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

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