Copied to clipboard

Flag this post as spam?

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


  • John C Scott 473 posts 1183 karma points
    Oct 19, 2011 @ 15:43
    John C Scott
    0

    dictionary items in dropdown

    I created a drop down data type with a number of choices from the dictionary. The system is configured to allow users with different languages to set up the content. When a user selects #option1 or #option2 in their language it is shown correctly in the other users language. However when I dispay the selected value ($currentPage/dropdownValue) I get #option1 with a hash instead of the translation to the site viewers language. OK that's ok I can use umbraco.library(getitemfromdictionary) but this doesn't work as it expects the # not to be supplied. So in the end I have written:

    <xsl:value-of select="umbraco.library:GetDictionaryItem(umbraco.library:Replace(eventType, '#', ''))"/>

    This feels wrong, but it works.

  • Blagojce Vojneski 5 posts 25 karma points
    Jun 25, 2015 @ 13:43
    Blagojce Vojneski
    0

    Hi John,

    Can you explain how it is possible to add Dictionary items in Dropdown data type?

    Thanks, Blagojce

  • John C Scott 473 posts 1183 karma points
    Jul 02, 2015 @ 10:21
    John C Scott
    0

    I don't recall this exactly, but I think this is just XSLT for a normal drop down. It is not a data type.

    I would expect dictionary values to work in a prevalue for a drop down data type. However I've never tried this and I don't know if they do.

  • 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