Getting a DAMP mediaitem in umbraco with razor

/ Published in: C#
Save to your folder(s)

This snippet applies if the datatype is DAMP and data is stored as full xml.

Copy this code and paste it in your HTML
  1. @if ( == typeof(umbraco.MacroEngines.DynamicXml))
  2. {
  3. //if mediatype is a file
  4. <a href="">file</a>
  5. //if mediatype is an image
  6. <img alt="pdf" height="70" src="" />
  7. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.