Error loading Razor Script [RAZOR]BoxNation-GetBoxersList.cshtml 'umbraco.MacroEngines.DynamicNodeList' does not contain a definition for 'Descendants'
Switch to Library.NodeById and everything is fine?
I am using standard Umbraco 4.7.1 Anyone else seen this behaviour, maybe a bug?
Might've been a typo in the blogpost but the two serve a completely different purpose. The pluralized version is for getting a list of DynamicNodes and the other version just gets a single dynamicnode. So, use NodeById if you want 1 node, NodesById if you need more of them.
NodesById or NodeById
Hello,
I have been trying to use Library.NodesById(2323).Descendants() as indicated in Gareths post here http://umbraco.com/follow-us/blog-archive/2011/9/22/umbraco-razor-feature-walkthrough%E2%80%93part-8.aspx but get the following error:
Error loading Razor Script [RAZOR]BoxNation-GetBoxersList.cshtml
'umbraco.MacroEngines.DynamicNodeList' does not contain a definition for 'Descendants'
Switch to Library.NodeById and everything is fine?
I am using standard Umbraco 4.7.1 Anyone else seen this behaviour, maybe a bug?
Thanks
Jeavon
Might've been a typo in the blogpost but the two serve a completely different purpose. The pluralized version is for getting a list of DynamicNodes and the other version just gets a single dynamicnode. So, use NodeById if you want 1 node, NodesById if you need more of them.
Ah ha, that makes more sense. Re-reading the blog post, it is quite confusing! Interestingly NodesById doesn't feature on the Razor cheatsheet at all.
Thanks Seb!
is working on a reply...