Copied to clipboard

Flag this post as spam?

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


  • metalforgood 36 posts 55 karma points
    Oct 24, 2011 @ 14:20
    metalforgood
    0

    Using Dictionary item in template

    Hi, if i want to set a label value to a dictionary item , and it changes according to the website if it's english or another language, is there a way to do that out of xslt

    this is what i do in my template file

     

    <label >

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

    </label>

    it's not working, can somebody help :) ?

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Oct 24, 2011 @ 14:24
    Tom Fulton
    0

    Hi,

    Yes - if I recall you can use the <umbraco:Item tag and replace the field attribute with your dictionary key, ex:

    <umbraco:itemfield="#Name"runat="server"/>

    -Tom

  • metalforgood 36 posts 55 karma points
    Oct 24, 2011 @ 14:27
    metalforgood
    0

    wow it did work :))) thanks a lot :)

  • TENNO 13 posts 73 karma points
    Oct 11, 2013 @ 18:58
    TENNO
    0

    It works, but Tom has Typo mestake -missing space between "Item" and "field" keywords-

      <umbraco:Item field="#Name"runat="server"/>

     

    you can also do it from the "insert umbraco dictionary item" in edit template window.

Please Sign in or register to post replies

Write your reply to:

Draft