Added tests for dynamic node to select children based on the child doc type names including pluralized names and added

support for checking with case insensitivity. Example. CurrentPage.NewsItems where NewsItem is a child doc type alias.
Found one reason why the old dynamic node has performance issues and have added a note, just need to do more reseearch to
make sure my findings are correct.
Changed over all of the new DynamicNode classes to be DynamicDocument instead.
This commit is contained in:
Shannon Deminick
2012-08-18 11:03:30 +06:00
parent 9177257952
commit 7175860ae0
23 changed files with 476 additions and 499 deletions

View File

@@ -411,6 +411,12 @@ namespace umbraco.MacroEngines
CMSNode working = ContentType.GetByAlias(node.NodeTypeAlias);
while (working != null)
{
//NOTE: I'm not sure if anyone has ever tested this but if you get working.Parent it will return a CMSNode and
// it will never be castable to a 'ContentType' object
// pretty sure the only reason why this method works for the one place that it is used is that it returns
// the current node's alias which is all that is actually requried, this is just added overhead for no
// reason
if ((working as ContentType) != null)
{
list.Add((working as ContentType).Alias);