Copied to clipboard

Flag this post as spam?

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


  • Mr A 216 posts 278 karma points
    Oct 03, 2012 @ 17:06
    Mr A
    0

    umbraco.MacroEngines.DynamicNodeList' does not contain a definition for 'Take'

    Hi , 

    Below is the code i am using to generate a list :

     

    @using umbraco.MacroEngines
    @using System.Linq
    @using System.Xml.Linq
    <div class="right-menu">
    <h1>Speaking Features</h1>
    @foreach (var page in @Model.NodeById(1112).Children.OrderBy("News").Take(5)) {
       <div class="right-menu-cover">
     <div class="thumb-image">                                            
        <img src="/[email protected]("Image").Value&amp;width=112&amp;height=62" alt="@page.imageCaption"  />
      </div> 
      <div class="right-title">
     <a href="@page.Url">@page.imagecaption</a></div>
    <div class="clear"> </div>
     </div>
    }
    <div class="clear"> </div>
    </div>

    Trace:

    umbracoMacro Error Loading Razor Script (file: Speaking- Right- Side- Menu) 'umbraco.MacroEngines.DynamicNodeList' does not contain a definition for 'Take'    at CallSite.Target(Closure , CallSite , Object , Int32 )

      at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)

      at ASP._Page_macroScripts_Speaking_Right_Side_Menu_cshtml.Execute() in d:\inetpub\vhosts\tangent-design.com\subdomains\amaechiperformance\httpdocs\macroScripts\Speaking-Right-Side-Menu.cshtml:line 8

      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()

      at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors)

      at System.Web.WebPages.WebPage.ExecutePageHierarchy()

      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)

      at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)

      at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage) 1.30575010231747 0.087427

    umbracoMacro Loading IMacroEngine script [done] 1.30585228010823 0.000102

    umbracoMacro Error loading MacroEngine script (file: Speaking-Right-Side-Menu.cshtml, Type: ''

    'umbraco.MacroEngines.DynamicNodeList' does not contain a definition for 'Take'

      at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)

     

    I have upgraded from 4.8.1 to 4.9.0

    Am i missing any reference or dll coz 'take' works fine in 4.7.1.1

    Any help or suggestion will be highly appreciated.

  • Mr A 216 posts 278 karma points
    Oct 03, 2012 @ 17:23
    Mr A
    0

    Also is the umbraco.Linq.Core removed in the latest version 4.9.0

Please Sign in or register to post replies

Write your reply to:

Draft