diff --git a/admin/javascript/LeftAndMain.Tree.js b/admin/javascript/LeftAndMain.Tree.js index 888ed3b49..f83f94cce 100644 --- a/admin/javascript/LeftAndMain.Tree.js +++ b/admin/javascript/LeftAndMain.Tree.js @@ -66,6 +66,9 @@ disallowedChildren = [], hintKey = newParentClass ? newParentClass : 'Root', hint = (typeof hints[hintKey] != 'undefined') ? hints[hintKey] : null; + + // Special case for VirtualPage: Check that original page type is an allowed child + if(hint && movedNode.attr('class').match(/VirtualPage-([^\s]*)/)) movedNodeClass = RegExp.$1; if(hint) disallowedChildren = (typeof hint.disallowedChildren != 'undefined') ? hint.disallowedChildren : []; var isAllowed = (