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
Hello, i'm trying to get a parameter "urlName" from media, and display it by a razor macro
So i got my umbraco config like this, and what's in bold is what i want
<DAMP fullMedia="">
<mediaItem>
<MultipleImage id="1135" version="6f8a3e4f-a557-4e6f-a7d9-216cead8e183" parentID="1122" level="3" writerID="0" nodeType="1134" template="0" sortOrder="1" createDate="2011-09-05T12:12:29" updateDate="2011-09-05T12:12:30" nodeName="Paysage" urlName="paysage" writerName="Admin" nodeTypeAlias="MultipleImage" path="-1,1121,1122,1135">
<image>/media/286/chrysanthemum.jpg</image>
</MultipleImage>
</mediaItem>
</DAMP>
My macro looks like this :
@{ dynamic mediaItem = new umbraco.MacroEngines.DynamicMedia(Parameter.photoId);}<div><img src="@mediaItem.Image"/><p>@mediaItem.urlName</p></div>
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 the parameter urlName from media for a macro
Hello, i'm trying to get a parameter "urlName" from media, and display it by a razor macro
So i got my umbraco config like this, and what's in bold is what i want
<DAMP fullMedia="">
<mediaItem>
<MultipleImage id="1135" version="6f8a3e4f-a557-4e6f-a7d9-216cead8e183" parentID="1122" level="3" writerID="0" nodeType="1134" template="0" sortOrder="1" createDate="2011-09-05T12:12:29" updateDate="2011-09-05T12:12:30" nodeName="Paysage" urlName="paysage" writerName="Admin" nodeTypeAlias="MultipleImage" path="-1,1121,1122,1135">
<image>/media/286/chrysanthemum.jpg</image>
</MultipleImage>
</mediaItem>
</DAMP>
My macro looks like this :
@{
dynamic mediaItem = new umbraco.MacroEngines.DynamicMedia(Parameter.photoId);
}
<div>
<img src="@mediaItem.Image"/>
<p>@mediaItem.urlName</p>
</div>
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.