agrath@gmail.com
00141ba801
Added a new feature for plugin developers to create a model class that DynamicNode will return for their data type instead of the underlying type
2011-06-19 08:19:11 -02:00
agrath@gmail.com
3480a5d957
Made DynamicNodeList.XPath only work for content as it is the only one with an XML Backing document
2011-06-18 15:46:34 -02:00
agrath@gmail.com
940239f1f2
Added HtmlTagWrapper.AddChildren and HtmlTagWrapper.AddChildrenAt methods
2011-06-16 11:02:23 -02:00
agrath@gmail.com
d4ed1efcf5
Fixed bug with HtmlTagWrapper.Write not writing if no children or attributes but class names were set
2011-06-16 10:59:36 -02:00
agrath@gmail.com
27aebac7e0
Aliased HtmlTagWrapper.Write as HtmlTagWrapper.ToHtml to match DynamicXml.ToHtml
2011-06-16 10:58:13 -02:00
agrath@gmail.com
86c9e8bde0
Added IsNotEqual IfHelper to DynamicNode and DynamicXml
2011-06-16 10:55:41 -02:00
agrath@gmail.com
9a1cfafb74
Made DynamicXml implicitly search child[0] if no match for dot notation chained child, fixes a regression/backwards compat change break due to the way elements are now consistently returned as sets
2011-06-16 09:54:53 -02:00
agrath@gmail.com
97a9d11cba
Added ToHtml method to DynamicXml which allows you to get an IHtmlString back if you didn't want DynamicXml for XML syntactically correct data
2011-06-16 09:29:38 -02:00
agrath@gmail.com
ee57f4c449
Adds pageName attribute to DynamicNode
...
Rename NodeById to NodesById when dealing with multiple parameters
Fixes work item 30290 : Strip - in element and attribute names for DynamicXml
2011-06-13 15:21:16 -02:00
agrath@gmail.com
2c22bea92f
Renamed inconsistently named multiple NodeById methods
2011-06-13 12:59:36 -02:00
agrath@gmail.com
8112f240be
Fixed an issue with GetProperty not finding properties according to the same case rules as DynamicNode and not falling back to local properties when the property wasn't on the Document Type
2011-06-13 12:28:35 -02:00
agrath@gmail.com
0a04252780
BugFix: Reworked GetProperty to support camel case conversion and reflective property access for non DocumentType properties
2011-06-13 10:15:29 -02:00
agrath@gmail.com
288bbe7b91
Added OrderBy to Grouping so the nested lists can be ordered by (supports single property only but does handle desc)
...
You can control the Group order by manipulating the source list order. Groups will be enumerated in the order they occur.
2011-06-13 09:12:11 -02:00
agrath@gmail.com
d2ddd9a284
Implemented DynamicNodeList.InGroupsOf, DynamicNodeList.GroupedInto and DynamicNodeList.GroupBy
2011-06-13 08:53:06 -02:00
agrath@gmail.com
fbe150c1ce
Fixed a stack overflow in Wrap
2011-06-13 08:39:32 -02:00
agrath@gmail.com
918cdcdffb
Added XPath filter & search to DynamicXml class
...
Added empty method stubs to DynamicNodeList for grouping functionality
2011-06-13 07:13:00 -02:00
agrath@gmail.com
b79586b4d7
Added new methods to HtmlTagWrapper: AddChild(TagWrapperBase [text or node]), AddChild(string), AddChildAt, RemoveChildAt, ClearChildren
...
Added new overloads to Library.Wrap - Adding children in one call and applying predicate check (bool - use @Model.Where() to return a bool)
Added new DynamicNode.Where overload that doesn't ternary text and just returns true/false (same as Element.Match in prototypejs)
2011-06-13 07:01:04 -02:00
agrath@gmail.com
60892f9909
fixed .Attr with HtmlTagWrapper
2011-06-12 20:33:48 -02:00
agrath@gmail.com
0cc7799797
HtmlTagWrapper don't write if empty, class methods, attribute methods
2011-06-12 20:12:52 -02:00
agrath@gmail.com
019141c042
Added Anonymous property collections to HtmlTagWrapper
2011-06-12 19:06:09 -02:00
agrath@gmail.com
942a3c3d72
HtmlTagWrapper, a new class to emit content wrapped in HTML tags. Similar to a cross between HtmlGenericControl and Webforms control and Razor HTML helpers.
...
First commit - internal attributes, classes, children and single tag wrapping.
Todo: don't write if empty, class methods, attribute methods, anonymous attribute parsing
2011-06-12 15:03:38 -02:00
agrath@gmail.com
11b64ccd0d
Fixed an issue with parent recursion and an ArgumentException being thrown when I really want null if no parent
...
Added DynamicNode.Where to enable string predicate parsing IIF
Added overloads to DynamicXml which take an xml string and a XPathNodeIterator
Added If method to @Library to make ternaries easier to read in a Razor template (no need for extra brackets)
Added ToDynamicXml overload methods for XPathNodeIterator and XElement to @Library
2011-06-12 13:34:15 -02:00
agrath@gmail.com
1f6cc18ba4
Clarified exceptions when using NodeById and MediaById and passing empty strings, e.g. if your source came from @Parameter
2011-06-12 12:17:00 -02:00
agrath@gmail.com
23145b9981
Added @Library.Concatenate and @Library.Join
2011-06-12 12:09:59 -02:00
agrath@gmail.com
ce4763a956
Added @Library.Coalesce
2011-06-12 12:00:05 -02:00
agrath@gmail.com
e2bbccdf6f
Added fallback overloads to GetPropertyValue - GetPropertyValue(string alias, bool recursive, string fallback), GetPropertyValue(string alias, string fallback)
2011-06-12 11:55:38 -02:00
agrath@gmail.com
0ea4e2f891
Added IsHelpers to DynamicXml
...
Added As<T>() [ return (item as T); ] to @Library
Added ToDynamicXml(string) to @Library
2011-06-12 11:50:35 -02:00
agrath@gmail.com
b367f63c1d
Fixed null reference problems with new dynamicbackingitem
...
Fixed recursive property null reference problems
Fixed issue with node having no children and property check crashing
Made DynamicXml behave more consistently based on user feedback
Added IsNull and HasValue to PropertyResult (comes back from GetProperty but you may need to cast it)
Added new Model.IsNull(string alias, bool recursive) and Model.HasValue(string alias, bool recursive) and Model.IsNull(string alias) and Model.HasValue(string alias)
2011-06-12 11:21:44 -02:00
agrath@gmail.com
c6dd41c36a
Deleted some unused class files
2011-06-12 08:23:28 -02:00
agrath@gmail.com
f2d8363556
Added IsHelper methods back into DynamicNode after I accidentally removed them while refactoring
...
Added new IsHelper methods for IsModZero, IsNotModZero, IsPosition, IsNotPosition, IsNotFirst, IsNotLast
Added .Count to DynamicXML
Fixed Media .Url and .NiceUrl to bring back umbracoFile
Moved MediaById and NodeById implementations to RazorLibraryCore and deprecated original methods with redirection
Fixed parsing issue with ExamineBackedMedia XPathNodeIterator cast method
2011-06-12 08:23:10 -02:00
agrath@gmail.com
9c2a9f81f4
Finished ExamineBackedMedia implementation and fixed bug with GetMedia fallback in example code (didn't add current node attributes so was inconsistent compared to examine)
2011-06-12 06:40:18 -02:00
agrath@gmail.com
d63ae05693
Got rid of DynamicMedia and DynamicMediaList implementations (still there but subclasses of DynamicNode & DynamicNodeList now) to enable navigation on Media
...
Started implementing ExamineBackedMedia instead of using new Media()
2011-06-11 22:15:01 -02:00
agrath@gmail.com
40099d9d22
Made DynamicNode and DynamicMedia share an intermediary base class (that inherits from DynamicObject) rather than both inheriting from DynamicObject directly
...
Want to share some functionality between them
2011-05-21 14:55:10 -12:00
agrath@gmail.com
cd13f8de55
Can't change the web.config for a 4.7.x release, redid implementation to not require web.config change
2011-05-21 14:47:57 -12:00
agrath@gmail.com
6a0dfc2c11
Razor @Library empty implementation
2011-05-21 14:34:46 -12:00
agrath@gmail.com
5c6e8526da
Changed IsLast implementation to behave properly when the DynamicNodeList is not a parent item children list
...
Changed IsHelper default valueIfFalse to be string.Empty on IsHelper(Func<DynamicNode,bool> func, string valueIfTrue) implementation
2011-04-05 23:15:23 -12:00
agrath@gmail.com
3c52ac851f
Slight change to handling of True/False when value isn't defined on a node but property is in DynamicNode
2011-04-05 23:06:30 -12:00
agrath@gmail.com
5bcf591a72
Fixed OrderBy for multiple properties when one or more of those properties is a real property on DynamicNode [CreateDate etc]
...
Fixed OrderBy so it doesn't crash when ordering by a property which doesn't exist on one of the DynamicNodes in the set
2011-03-25 10:48:03 -13:00
agrath@gmail.com
10672f02a1
Fixed .OrderBy with single properties which are implemented as actual properties (e.g. Level, CreateDate, UpdateDate) - dynamic properties should have ordered correctly
2011-03-25 09:47:00 -13:00
agrath@gmail.com
9a56886f1d
Made !, != true more robust when property may not exist on a node
...
Fixed some cases of && breaking where the wrong number of parameters was passed to the LambdaExpression
2011-03-25 09:34:39 -13:00
agrath@gmail.com
b198edeeaa
Made DynamicNodeList.Where, DynamicNodeList.OrderBy public again
2011-03-25 09:33:39 -13:00
agrath@gmail.com
76f83ddda0
Fixed RTE types in DynamicNode from still getting converted to DynamicXml due to missing return statement
2011-03-25 09:33:00 -13:00
agrath@gmail.com
23aa9e60fe
Added GetProperty(string alias, bool recursive) overload to DynamicNode
...
Added GetPropertyValue(string alias) and GetPropertyValue(string alias, bool recursive) to DynamicNode
2011-03-22 19:01:17 -13:00
agrath@gmail.com
3d396d2b63
Added Index/Position method to DynamicNode for when it's contained within a DynamicNodeList and you're iterating
...
Added bool IsHelper(Func<DynamicNode,bool>), string IsHelper(Func<DynamicNode,bool>, string valueIfTrue), string IsHelper(Func<DynamicNode,bool>, string valueIfTrue, string valueIfFlase)
Added IsFirst/IsLast/IsOdd/IsEven helpers for checking position in current context/list
Added IsEqual for checking if the current node matches another by Id
Added IsDescendant/IsDescendantOrSelf/IsAncestor/IsAncestorOrSelf for checking relationships between two nodes
2011-03-22 18:48:57 -13:00
agrath@gmail.com
93d65ced40
Add IsNull and HasValue methods to Dynamic* classes
...
**Breaking Change: DynamicNull.HasValue and DynamicNull.IsNull have been changed from properties to methods
Rename umbraco.MacroEngines.ExtensionMethods as umbraco.MacroEngines.PrivateExtensionMethods
Implement extension method invokes for DynamicNode
2011-03-22 18:02:32 -13:00
hartvig
8833034a35
Updates to Razor snippets (WIP)
2011-03-14 11:42:41 -01:00
agrath@gmail.com
1b060dfdbf
Implemented Pluck/Select to extract a given property from a DynamicNodeList and return it as a List<T>
...
Example:
var colours = @Model.Children.Select("colour");
//Red, Green, Blue ...
Uses the parser from .Where internally
Aliased as .Pluck
2011-03-12 16:29:02 -13:00
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
b624d7479a
Fixes work item: 30156, using prop.Contains(string) || !prop.Contains(string)
...
Added ContainsInsensitive extension method for use inside .Where (fixed method finder too)
2011-03-12 12:33:09 -13:00