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
Hi I am trying to get the media name in the alt attribute of img tag.
<img src='<umbraco:ItemField="topImage"Xslt="umbraco.library:GetMedia({0},0)/umbracoFile" runat="server" />' alt='<umbraco:Item Field="topImage" Xslt="umbraco.library:GetMedia({0},0)/mediaName" runat="server" />' title="test" class="templateImage" />
I am using umbraco 4.11.8 and the WebForms schema
Hi Moran,
Try this one:
<img src='<umbraco:ItemField="topImage"Xslt="umbraco.library:GetMedia({0},0)/umbracoFile"runat="server"/>'alt='<umbraco:Item Field="topImage" Xslt="umbraco.library:GetMedia({0},0)/@nodeName"runat="server"/>'title="test"class="templateImage" />
That shoud give you the name of the image in the media library.
I hope this helps you,
/Dennis
Thanks :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Getting media name in template
Hi I am trying to get the media name in the alt attribute of img tag.
I am using umbraco 4.11.8 and the WebForms schema
Hi Moran,
Try this one:
That shoud give you the name of the image in the media library.
I hope this helps you,
/Dennis
Thanks :)
is working on a reply...