Posted By

fengelz on 09/23/11


media umbraco razor damp

Versions (?)

Getting a DAMP mediaitem in umbraco with razor

 / Published in: C#

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

  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  

You need to login to post a comment.