Andriy B.
Andriy B.

Reputation: 451

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!

Upvotes: 2

Views: 1335

Answers (1)

Mark
Mark

Reputation: 3271

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

Upvotes: 4

Related Questions