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 5061 posts 15544 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  
    }
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies