Sitecore verison - 9.0.2 Glass version -

We are trying to use Glass @RenderLink to render a pdf media item, it's generating anchor tag with below path


Which is going to page not found as expected. I believe it should render as below:


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>


Glass model is generated by TDS and the Link field in the model as below:

Link LinkName{get; set;}
  • Can you add a code example of how you are rendering the link? And how your model is setup?
    – Richard Seal
    Commented Oct 23, 2018 at 13:35
  • What type of field is your LinkName field? Commented Oct 24, 2018 at 11:10
  • @DanSinclair GeneralLink Commented Oct 24, 2018 at 15:19
  • @DheerajPalagiri how did you select your media item? Did you use a Media Link or an Internal 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). Commented Oct 24, 2018 at 19:03
  • @DanSinclair I used media link. Commented Oct 26, 2018 at 8:46

1 Answer 1


I have found an alternative for rendering pdf link media item through Glass.


worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.