Search code examples
umbracoumbraco7

How to get Nested Dictionary Item in Umbraco?


I using Umbraco 7.4.3.

I created few dictionary items (rot item with few children items), like below: HomePage Intro Body

When I try to get dictionary value for sub-item I getting empty string, however for root item I get correct result.

For example, this call works - returns value according to current language:

@Umbraco.GetDictionaryValue("HomePage")

but this call doesn't work - returns empty string:

@Umbraco.GetDictionaryValue("HomePage.Intro")

Please help!


Solution

  • Make sure the child dictionary item has the full key specified: "HomePage.Intro"

    Your tree should look like this:

    HomePage
    - HomePage.Intro
    

    An example of the dictionary tree I'm currently using:

    enter image description here