New DynamicNode .MediaById (because @Model is DynamicNode) to find a media item by id, e.g. if you are using it with @Model.Parameters.imageId
Overloads for MediaById and NodeById that take object and string to match constructors
This makes the code cleaner and also allows for the .Items (underlying initialization data for DynamicNodeList) to be exposed when you have an instance and hide all of the singular properties etc (Url, Name) that are on DynamicNode - they're not applicable for a List.
Rewrote the reflection code for calling methods on DynamicNodeList to allow mix-ins (e.g. external dlls) to have an extension method defined for DynamicNodeList (e.g. Random(nodeCount))
Lambda syntax still doesn't work (e.g. Children.Where(item=>item.shouldBeVisible)) however methods that don't take lamdas (Take, Random[external], Skip, ElementAt, First, etc) work
NiceUrlFetch now uses the new niceUrlJuno function. The result of niceUrlJuno does not include a leading slash. The old NiceUrl (used in the presentation of the URL) does include one, leading to wrong URLs.
Added a cache for the propertyType lookup (within a single DynamicNode instance) in case the razor logic needs to check the same boolean multiple times within a node.
Should improve performance if working with large trees & repeatedly checking a boolean value
Added a new DynamicMedia class that wraps umbraco.cms.businesslogic.media.Media which caches GetProperty calls (while DynamicMedia is instantiated)
Added method to DynamicNode to retrieve a property as DynamicMedia: @Model.Media("catPicture"); or @Model.Media("catPicture").umbracoFile;
Added overload to DynamicNode Media method for shorthand if you only want one property; @Model.Media("catPicture","umbracoFile");
@Model.catPicture will still return the nodeId of the media item because we can't easily check the propertyType (no propertyType on IProperty)
var someNode = new umbraco.MacroEngines.DynamicNode(1046) in your template, it instantiates a DynamicNode like you'd expect, but then it doesn't function as a dynamic object
because it wasn't initialised as a dynamic variable [dynamic someNode = new umbraco.MacroEngines.DynamicNode(1046)]
Added a method to DynamicNode called NodeById which returns a new DynamicNode with the ID you pass, so you can call it off @Model
e.g. var item = @Model.NodeById(1046) will still function as a dynamic, even though it was defined as var
Also fixed post-build rule on umbraco.MacroEngines which had an incorrect path for copying umbraco.MacroEngines to presentation (allows debug without manual file copy, I think)
Added AncestorOrSelf overload which doesn't require a Func<DynamicNode,bool> argument
Both changes modify DynamicNode.Parent so that if there is no parent, it returns itself instead of null, (you can't new DynamicNode(null) as it throws exception)
and then in the AncestorOrSelf checks, the loop makes sure that it won't get stuck by continually returning itself (because this.Parent returns this)