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...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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...