Commit Graph

16 Commits

Author SHA1 Message Date
agrath@gmail.com
1a2bba4b2b Added data type detection for MNTP/CSV to return List<int> and fix for NodeById/MediaById to handle List<int> correctly 2011-03-12 15:19:54 -13:00
agrath@gmail.com
44bfcaf373 Changed the decimal.TryParse code slightly to replace , with . before parse attempt
This is because strings like this: "2442,5453,5366" were incorrectly parsing to be "244254535366"
2011-03-12 15:07:17 -13:00
agrath@gmail.com
ddcf34b80c Added .Sibling to DynamicNodeWalker which is a shorthand for checking both .Next() and .Previous()
overloads are .Sibling(int) [which you can pass negative to and is equivilent to .Previous(+int) ] or .Sibling(string) which checks nodeTypeAlias
.Sibling(string) will start walking forward at the current node and then wrap back to 0 until it reaches the starting point again
2011-03-08 19:54:55 -13:00
agrath@gmail.com
a02aca0f62 Added support to DynamicNodeWalker for finding nodes that are Up/Down/Previous/Next by NodeTypeAlias
Up and down are similar to Ancestors(string nodeTypeAlias)/Descendants(string nodeTypeAlias) but return the first match
2011-03-08 19:42:59 -13:00
agrath@gmail.com
017ed3635a Fixed .Ancestors(int) to return ancestors where the level <= int rather than level = int to match .Descendants(int) >= behaviour 2011-03-08 18:43:59 -13:00
agrath@gmail.com
9949420c6d Change HasAccess and IsProtected to be getters so they can be used in .Where
http://umbraco.codeplex.com/workitem/30096

Add support to DynamicQueryable for accessing properties that are not dynamic and are actually defined on DynamicNode
2011-03-08 18:38:06 -13:00
agrath@gmail.com
bc8f21f92d Added implementation for .Visible which wraps umbracoNaviHide != 1 2011-03-08 18:09:06 -13:00
agrath@gmail.com
aaa90bea14 More graceful handling of missing properties in .Where - TryGetMember now returns DynamicNull
Only return DynamicNull if property truely doesn't exist - if it does exist and has no value, still return null
2011-02-27 22:55:50 -13:00
agrath@gmail.com
60c18bdff9 More graceful handling of missing properties in .Where - TryGetMember now returns DynamicNull (IEnumerable with fake .Where and .OrderBy) when the property/child type doesn't exist.
Expression Tree in DynamicQueryable explictly checks for this type and forces that portion of the predicate/expression tree to return true, bypassing the missing property
Handy when you are checking e.g. a boolean property in a .Where and that boolean doesn't exist on all nodes.
2011-02-27 21:53:45 -13:00
agrath@gmail.com
bba0fcfd5f Merge 2011-02-27 09:00:00 -13:00
agrath@gmail.com
7ca429cb61 Added overloads to AncestorsOrSelf, Ancestors, Descendants, DecendentsOrSelf to filter by Level or NodeTypeAlias
Rewrote implementations internally so a Func<DynamicNode,bool> [or Func<INode,bool>] is used so that there's only one implementation of each
2011-02-27 08:55:15 -13:00
hartvig
9729ad4d31 Work items: 30082
Properties from Richtext editor isn't encoded by razor anymore as DynamicNode will return an IHtmlString for RTE properties
Changed the lookups of Yes/no and tinmce datatypes ids to consts as these won't change anyway
2011-02-27 12:13:04 -01:00
agrath@gmail.com
1f05d43047 Added new overloads to MediaById and NodeById which take List<object> or params object[] and return DynamicNodeList or DynamicMediaList [new - doesn't support OrderBy,Where etc]
Added to allow retreiving multiple items by id when you know the Ids, e.g.: using MNTP to select nodes and then needing to get them in Razor
2011-02-26 11:43:23 -13:00
agrath@gmail.com
3961787463 Added DynamicNode.HasProperty(string) method to check to see if a particular DynamicNode has a property 2011-02-25 00:51:41 -13:00
agrath@gmail.com
71c5e35443 Added DynamicNodeWalker and implementation on DynamicNode and DynamicNodeList
DynamicNodeWalker is our secret weapon in the fight against the Rebel XSLT Alliance
Navigate nodes by calling Up(), Down(), Next() and Previous() on them
Next(1) will jump two items along within the current list, whereas Next() will walk by one within the list
Previous(1) will move two items backwards within the current list
Up() is a special wrapper around .Parent which has an overload .Up(int) to replace @Model.Parent.Parent.Parent... [.Up(2)]
Down() will take you to the first Child item and is equivilent to .Children.First(), use .Down(1) to replace .Children.First().Children
If one of the NodeWalker functions fails to find a node at the requested position, it will return null
2011-02-24 17:19:50 -13:00
agrath@gmail.com
603a12c5a0 Split umbraco.MacroEngines.Juno into two subfolders (namespaces remain the same)
RazorCore contains all the core razor engine implementation
RazorDynamicNode contains all the DynamicNode functionality and associated support files
2011-02-24 16:05:54 -13:00