Commit Graph

13 Commits

Author SHA1 Message Date
agrath
9760ad29c8 Added a cached fallback for custom properties for media when that media item was loaded from examine as the examine fields collection doesn't contain them 2011-09-06 10:28:43 -12:00
agrath
c657236f7c Fixed DynamicBackingItem autodetection of Media used in NodeById, now you can use NodeById to get Media or Content nodes 2011-08-17 21:27:09 -12:00
agrath
b023455068 Added an overload to NodesById and DynamicBackingItem/DynamicNode to signify you want a List<int> to be treated as media, not content 2011-08-15 10:18:15 -12:00
agrath@gmail.com
1164ea3ab1 Fixed a bug where if the ContentType (DocumentType) tree was a different tree to the Content or Media (Node) tree then the datatype lookup could fail when retrieving a property recursively.
If GetProperty recursively walked up the content tree to the first node that defined the property and eventutally found it, and the NodeType[Alias] of the node it was found on was not a parent of the original content's node type, then the lookup would fail.
Changed DynamicBackingItem.GetProperty (and PropertyResult class) to return the Node/Context where the property is being returned from and used this context's NodeTypeAlias as the in the data type lookup.
2011-07-03 09:32:29 -12:00
agrath@gmail.com
75d15cdc31 Made GetProperty break earlier if context/parent is null (prevents NRE) and slightly changed behaviour so that empty strings will go recursively to the parent. Added prefix to property access (_) which will cause the property to be looked up recursively. This syntax is used when you want to get the value recursively, but you want to still apply the IRazorDataTypeModel (as @Model.GetPropertyValue won't do that). Syntax is: @Model._propertyName - had to be a _ as that is legal c# 2011-07-02 17:29:47 -12:00
agrath@gmail.com
5988ff5da8 Added a try/catch to GetPropertyInternal to catch a potential MissingMethodException when trying to locate a property that didn't exist 2011-06-29 17:45:08 -12: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
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
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
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