Copied to clipboard

Flag this post as spam?

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


  • Bruno 12 posts 32 karma points
    Oct 12, 2015 @ 11:43
    Bruno
    0

    Can't get Dictionary Umbraco 7.3.0

    I can't seem to get dictionary items on Umbraco 7.3.0.

    I'm doing it on a partial view.

    I've used:

    @Umbraco.GetDictionaryValue("Share") @Umbraco.GetDictionaryValue("Share").ToString() @umbraco.library.GetDictionaryItem("Share")

    None of these worked. I do have the dictionary created and populated.

    Does anyone know something about it?

    Thanks

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Oct 12, 2015 @ 11:53
    Dennis Aaen
    0

    Hi Bruno,

    I have just tried creating a dictionary item on Umbraco version 7.3.0 assembly: 1.0.5750.18157 and pull the value out in a template from the TXT starter kit using this.

    I have no issues to get the value by using this:

    @Umbraco.GetDictionaryValue("HomePage") 
    

    HomePage is the name of the dictionary item in the backoffice.

    /Dennis

  • Bruno 12 posts 32 karma points
    Oct 12, 2015 @ 11:56
    Bruno
    0

    Yeah I've been trying that but no luck. My dictionary item is named "Share". This is my code at the moment.

    <h6 class="uppercase">
        @Umbraco.GetDictionaryValue("Share") 
    </h6>
    

    Doesn't return anything. The dictionary item has all the values.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Oct 12, 2015 @ 11:57
    Dennis Aaen
    0

    Hi Bruno,

    If you have more that one language in your Umbraco installation did the dictionary also have an value on the language that you are on right now?

    /Dennis

  • Bruno 12 posts 32 karma points
    Oct 12, 2015 @ 12:00
    Bruno
    0

    Hi Dennis.

    Yes it does. I have 3 languages at the moment, Portuguese, Brasilian and English.

    Here's a pic.

    https://gyazo.com/cd13adecde2ffe0a579b1d687091100f

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Oct 12, 2015 @ 12:02
    Dennis Aaen
    0

    Hi Bruno,

    Hmm sounds strange, maybe you should try republish the website, or recycle the app pool, perhaps it some cache.

    Hope this helps,

    /Dennis

  • Bruno 12 posts 32 karma points
    Oct 12, 2015 @ 12:08
    Bruno
    0

    Hi Dennis,

    No, i've tried all that, ended the app pool process. Republished the entire site and republished all the nodes too.

    I was working on localhost. Tried to see it it could be something about that and added the same dictionary to my dev server. No luck, still doesn't return anything

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Oct 12, 2015 @ 12:15
    Dennis Aaen
    0

    Hi Bruno,

    Is it the same issue with all of your dictionary items or just this specific one?

    /Dennis

  • Bruno 12 posts 32 karma points
    Oct 12, 2015 @ 13:20
    Bruno
    0

    Hi Dennis,

    Yes it's withall the dictionary items, I've tried to create another one name "Share2". Still nothing. I can't figure out what's happening.

  • Comment author was deleted

    Oct 12, 2015 @ 13:33

    Hey Bruno, did you assign languages to the content tree?

  • Bruno 12 posts 32 karma points
    Oct 12, 2015 @ 13:48
    Bruno
    0

    Hi Tym,

    Yes I did, pt-PT / pt-BR / en-US All with a different url " /en " - "/pt " - " /br "

  • 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