Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
How do i get an item from the dictionary?
I've tried this, passing a parameter in the macro:
@{
var image = @Model.AncestorOrSelf().Media("siteLogo");
var link = "@Model.Parameter.LogoLink";
}
<a href="@link" title="Home">
<img alt='@image.Name' src='@image.UmbracoFile' />
</a>
This doesnt work, i've also tried this, but then i get an error:
var link = "@Model.Dictionary.DictionaryItemAlias("LogoLink");
Try:
@umbraco.library.GetDictionaryItem("LogoLink")
Great, that does the trick! :)
is working on a reply...
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.
Continue discussion
Get DictionaryItem, How?
How do i get an item from the dictionary?
I've tried this, passing a parameter in the macro:
@{
var image = @Model.AncestorOrSelf().Media("siteLogo");
var link = "@Model.Parameter.LogoLink";
}
<a href="@link" title="Home">
<img alt='@image.Name' src='@image.UmbracoFile' />
</a>
This doesnt work, i've also tried this, but then i get an error:
var link = "@Model.Dictionary.DictionaryItemAlias("LogoLink");
Try:
@umbraco.library.GetDictionaryItem("LogoLink")
Great, that does the trick! :)
is working on a reply...
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.