Copied to clipboard

Flag this post as spam?

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


  • Stacy Basye 19 posts 80 karma points
    Dec 15, 2014 @ 22:35
    Stacy Basye
    0

    Using Dictionary Items in XSLT

    I'm working on a site which uses a couple .xslt files to handle embedding videos. I don't know a thing about .xslt. Never touched it in my life. But, I saw on another forum thread that the string I'll need here is this, I think:

    <p>umbraco.library:GetDictionaryItem("NameOfDictionaryItem")</p>

    My question is, do I need to wrap this code in something like this:

    <xsl:blahblah>
      <p>umbraco.library:GetDictionaryItem("NameOfDictionaryItem")</p>
    </xsl>

    I can show the code of the whole file if need be... Just don't know how much of it is relevant.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Dec 15, 2014 @ 22:56
    Dennis Aaen
    0

    Hi Stacy,

    You need to wrap your dictionary items in XSLT like this

    <xsl:value-of select="umbraco.library:GetDictionaryItem('NameOfDictionaryItem')" />

    Then you can wrap a paragraph tag around the <xsl:value-of select="umbraco.library:GetDictionaryItem('NameOfDictionaryItem')" />, try to see this post http://24days.in/umbraco/2013/the-dictionary-secrets/ from the last year advent calendar, a post written by Jan Skovgaard about using dictionary items in Umbraco.

    And remember the dictionary itemĀ“s name is the key, and the key must be unique.

    Hope this helps,

    /Dennis

  • Stacy Basye 19 posts 80 karma points
    Dec 15, 2014 @ 23:17
    Stacy Basye
    0

    Thank you very much, Dennis!

Please Sign in or register to post replies

Write your reply to:

Draft