Sitecore verison - 9.0.2 Glass version - 5.0.6.0
We are trying to use Glass @RenderLink to render a pdf media item, it's generating anchor tag with below path
/sitecore/media-library/site-content/xxx/your-account/xxx/xxx/pdfFileName
Which is going to page not found as expected. I believe it should render as below:
/~/media/site-content/xxx/your-account/xxx/xxx/pdfFileName.ashx
Looks like Glass issue, am I right?
Is there an alternative way to render pdf link, our cshtml is a Glass View rendering.
Code Example view.cshtml:
@inherits Glass.Mapper.Sc.Web.Mvc.GlassView<xxx.Data.GlassModel.sitecore.templates.xx.Journeys.Components.Ixxx>
@Editable(x=>x.Heading)
@RenderLink(x=>x.LinkName)
@Editable(x=>x.Description)
Glass model is generated by TDS and the Link field in the model as below:
[SitecoreField(Ixxxx.LinkNameFieldName)]
Link LinkName{get; set;}
LinkName
field?Media Link
or anInternal Link
? I've sometimes found one to be problematic when creating links, where the other works fine (can't remember which is which off the top of my head).