Dictionary structure
p
Hey everyone! I'm currently wondering whether there is a better way to organize the dictionary. Currently i always have to rewrite the same name again if i want to directly tag it in the code. What i mean by this is would it be possible to do it like this: Blocks => Jobs => MostRead and **not **like this: Blocks => Blocks.Jobs => Blocks.Jobs.MostRead. The reason i'm asking is because in the backoffice if there are two MostRead with the same name what happens? Would i still be able to do it in a way like this?
Copy code
@Umbraco.GetDictionaryValue("Blocks.Jobs.MostRead")
s
I'm pretty sure that you can't have two items with the same key, at least Deploy and uSync doesn't like that 🙂
r
I think that’s the case .. duplicates is generally bad.. obvs the easiest way is to blockmostread, othermostread , etc most read
No it’s not pretty but it should simply solve your pickle and make the code unique and readable
s
There is a unique constraint on dictionary items in the current implementation.
4 Views