Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Wayne 19 posts 59 karma points
    Jul 09, 2011 @ 05:00
    Wayne
    0

    'umbraco.MacroEngines.DynamicMedia' does not contain a definition for 'umbracoFile'

    For some reason I'm getting the error "'umbraco.MacroEngines.DynamicMedia' does not contain a definition for 'umbracoFile'"

    from the following code

    @inherits umbraco.MacroEngines.DynamicNodeContext
    
    @foreach (dynamic mediaItem in @Model.Media("videoFolder").Children)
    {    
    @mediaItem.umbracoFile  
    }
    

    I definitly have umbracoFile as a property of the media.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 09, 2011 @ 09:50
    Sebastiaan Janssen
    0

    You don't need the inherit. This should work for you: 

    @foreach (dynamic mediaItem in Model.MediaById(Model.videoFolder).Children)
    {    
        @mediaItem.umbracoFile  
    }
Please Sign in or register to post replies

Write your reply to:

Draft