diff --git a/src/Umbraco.Web/umbraco.presentation/macro.cs b/src/Umbraco.Web/umbraco.presentation/macro.cs
index 80fe808478..3ac43525f5 100644
--- a/src/Umbraco.Web/umbraco.presentation/macro.cs
+++ b/src/Umbraco.Web/umbraco.presentation/macro.cs
@@ -469,7 +469,7 @@ namespace umbraco
break;
}
case (int)MacroTypes.XSLT:
- macroControl = loadMacroXSLT(this, Model, pageElements);
+ macroControl = LoadMacroXslt(this, Model, pageElements, true);
break;
case (int)MacroTypes.Script:
@@ -765,30 +765,20 @@ namespace umbraco
HttpRuntime.Cache.Remove("macroXslt_" + XsltFile);
}
- private Hashtable keysToLowerCase(Hashtable input)
- {
- var retval = new Hashtable();
- foreach (object key in input.Keys)
- retval.Add(key.ToString().ToLower(), input[key]);
-
- return retval;
- }
-
- public Control loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)
+ internal Control LoadMacroXslt(macro macro, MacroModel model, Hashtable pageElements, bool throwError)
{
if (XsltFile.Trim() != string.Empty)
{
// Get main XML
- XmlDocument umbracoXML = content.Instance.XmlContent;
+ var umbracoXml = content.Instance.XmlContent;
// Create XML document for Macro
- var macroXML = new XmlDocument();
- macroXML.LoadXml("");
+ var macroXml = new XmlDocument();
+ macroXml.LoadXml("");
- foreach (MacroPropertyModel prop in macro.Model.Properties)
+ foreach (var prop in macro.Model.Properties)
{
- addMacroXmlNode(umbracoXML, macroXML, prop.Key, prop.Type,
- prop.Value);
+ addMacroXmlNode(umbracoXml, macroXml, prop.Key, prop.Type, prop.Value);
}
if (HttpContext.Current.Request.QueryString["umbDebug"] != null && GlobalSettings.DebugMode)
@@ -796,7 +786,7 @@ namespace umbraco
return
new LiteralControl("
Debug from " +
macro.Name +
- "" + HttpContext.Current.Server.HtmlEncode(macroXML.OuterXml) +
+ "
" + HttpContext.Current.Server.HtmlEncode(macroXml.OuterXml) +
"
");
}
@@ -806,7 +796,7 @@ namespace umbraco
try
{
- Control result = CreateControlsFromText(GetXsltTransformResult(macroXML, xsltFile));
+ var result = CreateControlsFromText(GetXsltTransformResult(macroXml, xsltFile));
TraceInfo("umbracoMacro", "After performing transformation");
@@ -824,18 +814,32 @@ namespace umbraco
ie = ie.InnerException;
}
- var macroErrorEventArgs = new MacroErrorEventArgs {Name = Model.Name, Alias = Model.Alias, ItemKey = Model.Xslt, Exception = e, Behaviour = UmbracoSettings.MacroErrorBehaviour};
- return GetControlForErrorBehavior("Error parsing XSLT file: \\xslt\\" + XsltFile, macroErrorEventArgs);
+ var macroErrorEventArgs = new MacroErrorEventArgs { Name = Model.Name, Alias = Model.Alias, ItemKey = Model.Xslt, Exception = e, Behaviour = UmbracoSettings.MacroErrorBehaviour };
+ var macroControl = GetControlForErrorBehavior("Error parsing XSLT file: \\xslt\\" + XsltFile, macroErrorEventArgs);
+ //if it is null, then we are supposed to throw the (original) exception
+ // see: http://issues.umbraco.org/issue/U4-497 at the end
+ if (macroControl == null && throwError)
+ {
+ throw;
+ }
+ return macroControl;
}
}
catch (Exception e)
{
Exceptions.Add(e);
LogHelper.WarnWithException("Error loading XSLT " + Model.Xslt, true, e);
-
+
// Invoke any error handlers for this macro
- var macroErrorEventArgs = new MacroErrorEventArgs {Name = Model.Name, Alias = Model.Alias, ItemKey = Model.Xslt, Exception = e, Behaviour = UmbracoSettings.MacroErrorBehaviour};
- return GetControlForErrorBehavior("Error reading XSLT file: \\xslt\\" + XsltFile, macroErrorEventArgs);
+ var macroErrorEventArgs = new MacroErrorEventArgs { Name = Model.Name, Alias = Model.Alias, ItemKey = Model.Xslt, Exception = e, Behaviour = UmbracoSettings.MacroErrorBehaviour };
+ var macroControl = GetControlForErrorBehavior("Error reading XSLT file: \\xslt\\" + XsltFile, macroErrorEventArgs);
+ //if it is null, then we are supposed to throw the (original) exception
+ // see: http://issues.umbraco.org/issue/U4-497 at the end
+ if (macroControl == null && throwError)
+ {
+ throw;
+ }
+ return macroControl;
}
}
@@ -843,6 +847,11 @@ namespace umbraco
return new LiteralControl(string.Empty);
}
+ public Control loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)
+ {
+ return LoadMacroXslt(macro, model, pageElements, false);
+ }
+
///
/// Parses the text for umbraco Item controls that need to be rendered.
///
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs
index 7ba77ac082..b14b1380ce 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs
@@ -4,6 +4,7 @@ using System.ComponentModel;
using System.Linq;
using System.Xml;
using umbraco.cms.businesslogic.web;
+using umbraco.interfaces;
using umbraco.NodeFactory;
namespace umbraco
@@ -20,6 +21,17 @@ namespace umbraco
/// The level.
/// Returns an ancestor node by path level.
public static Node GetAncestorByPathLevel(this Node node, int level)
+ {
+ return (Node) GetAncestorByPathLevel((INode) node, level);
+ }
+
+ ///
+ /// Gets the ancestor by path level.
+ ///
+ /// The node.
+ /// The level.
+ /// Returns an ancestor node by path level.
+ public static INode GetAncestorByPathLevel(this INode node, int level)
{
var nodeId = uQuery.GetNodeIdByPathLevel(node.Path, level);
return uQuery.GetNode(nodeId);
@@ -32,12 +44,23 @@ namespace umbraco
/// an umbraco.presentation.nodeFactory.Node object
/// Node as IEnumerable
public static IEnumerable GetAncestorNodes(this Node node)
+ {
+ return GetAncestorNodes((INode)node).Cast();
+ }
+
+ ///
+ /// Functionally similar to the XPath axis 'ancestor'
+ /// Get the Ancestor Nodes from current to root (useful for breadcrumbs)
+ ///
+ /// an umbraco.interfaces.INode object
+ /// INode as IEnumerable
+ public static IEnumerable GetAncestorNodes(this INode node)
{
var ancestor = node.Parent;
while (ancestor != null)
{
- yield return ancestor as Node;
+ yield return ancestor as INode;
ancestor = ancestor.Parent;
}
@@ -49,6 +72,16 @@ namespace umbraco
/// an umbraco.presentation.nodeFactory.Node object
/// Node as IEnumerable
public static IEnumerable GetAncestorOrSelfNodes(this Node node)
+ {
+ return GetAncestorOrSelfNodes((INode)node).Cast();
+ }
+
+ ///
+ /// Functionally similar to the XPath axis 'ancestor-or-self'
+ ///
+ /// an umbraco.interfaces.INode object
+ /// INode as IEnumerable
+ public static IEnumerable GetAncestorOrSelfNodes(this INode node)
{
yield return node;
@@ -64,10 +97,20 @@ namespace umbraco
/// an umbraco.presentation.nodeFactory.Node object
/// Node as IEumerable
public static IEnumerable GetPrecedingSiblingNodes(this Node node)
+ {
+ return GetPrecedingSiblingNodes((INode)node).Cast();
+ }
+
+ ///
+ /// Functionally similar to the XPath axis 'preceding-sibling'
+ ///
+ /// an umbraco.interfaces.INode object
+ /// INode as IEumerable
+ public static IEnumerable GetPrecedingSiblingNodes(this INode node)
{
if (node.Parent != null)
{
- var parentNode = node.Parent as Node;
+ var parentNode = node.Parent as INode;
foreach (var precedingSiblingNode in parentNode.GetChildNodes().Where(childNode => childNode.SortOrder < node.SortOrder))
{
yield return precedingSiblingNode;
@@ -81,10 +124,20 @@ namespace umbraco
/// an umbraco.presentation.nodeFactory.Node object
/// Node as IEumerable
public static IEnumerable GetFollowingSiblingNodes(this Node node)
+ {
+ return GetFollowingSiblingNodes((INode)node).Cast();
+ }
+
+ ///
+ /// Functionally similar to the XPath axis 'following-sibling'
+ ///
+ /// an umbraco.interfaces.INode object
+ /// INode as IEumerable
+ public static IEnumerable GetFollowingSiblingNodes(this INode node)
{
if (node.Parent != null)
{
- var parentNode = node.Parent as Node;
+ var parentNode = node.Parent as INode;
foreach (var followingSiblingNode in parentNode.GetChildNodes().Where(childNode => childNode.SortOrder > node.SortOrder))
{
yield return followingSiblingNode;
@@ -98,10 +151,20 @@ namespace umbraco
/// an umbraco.presentation.nodeFactory.Node object
/// Node as IEumerable
public static IEnumerable GetSiblingNodes(this Node node)
+ {
+ return GetSiblingNodes((INode)node).Cast();
+ }
+
+ ///
+ /// Gets all sibling Nodes
+ ///
+ /// an umbraco.interfaces.INode object
+ /// INode as IEumerable
+ public static IEnumerable GetSiblingNodes(this INode node)
{
if (node.Parent != null)
{
- var parentNode = node.Parent as Node;
+ var parentNode = node.Parent as INode;
foreach (var siblingNode in parentNode.GetChildNodes().Where(childNode => childNode.Id != node.Id))
{
yield return siblingNode;
@@ -115,6 +178,16 @@ namespace umbraco
/// an umbraco.presentation.nodeFactory.Node object
/// Node as IEnumerable
public static IEnumerable GetDescendantOrSelfNodes(this Node node)
+ {
+ return GetDescendantOrSelfNodes((INode)node).Cast();
+ }
+
+ ///
+ /// Functionally similar to the XPath axis 'descendant-or-self'
+ ///
+ /// an umbraco.interfaces.INode object
+ /// INode as IEnumerable
+ public static IEnumerable GetDescendantOrSelfNodes(this INode node)
{
yield return node;
@@ -133,7 +206,19 @@ namespace umbraco
/// Node as IEnumerable
public static IEnumerable GetDescendantNodes(this Node node)
{
- foreach (Node child in node.Children)
+ return GetDescendantNodes((INode) node).Cast();
+ }
+
+ ///
+ /// Functionally similar to the XPath axis 'descendant'
+ /// Make the All Descendants LINQ queryable
+ /// taken from: http://our.umbraco.org/wiki/how-tos/useful-helper-extension-methods-%28linq-null-safe-access%29
+ ///
+ /// an umbraco.interfaces.INode object
+ /// INode as IEnumerable
+ public static IEnumerable GetDescendantNodes(this INode node)
+ {
+ foreach (INode child in node.ChildrenAsList)
{
yield return child;
@@ -153,7 +238,19 @@ namespace umbraco
/// Nodes as IEnumerable
public static IEnumerable GetDescendantNodes(this Node node, Func func)
{
- foreach (Node child in node.Children)
+ return GetDescendantNodes((INode)node, (Func) func).Cast();
+ }
+
+ ///
+ /// Drills down into the descendant nodes returning those where Func is true, when Func is false further descendants are not checked
+ /// taken from: http://ucomponents.codeplex.com/discussions/246406
+ ///
+ /// The umbraco.interfaces.INode.
+ /// The func
+ /// INode as IEnumerable
+ public static IEnumerable GetDescendantNodes(this INode node, Func func)
+ {
+ foreach (INode child in node.ChildrenAsList)
{
if (func(child))
{
@@ -175,6 +272,18 @@ namespace umbraco
/// The document type alias.
/// Nodes as IEnumerable
public static IEnumerable GetDescendantNodesByType(this Node node, string documentTypeAlias)
+ {
+ return GetDescendantNodesByType((INode)node, documentTypeAlias).Cast();
+ }
+
+ ///
+ /// Gets the descendant nodes by document-type.
+ /// Get all descendants, and then return only those that match the requested typeAlias
+ ///
+ /// The umbraco.interfaces.INode.
+ /// The document type alias.
+ /// INodes as IEnumerable
+ public static IEnumerable GetDescendantNodesByType(this INode node, string documentTypeAlias)
{
return node.GetDescendantNodes().Where(x => x.NodeTypeAlias == documentTypeAlias);
}
@@ -189,10 +298,20 @@ namespace umbraco
/// Node as IEnumerable
public static IEnumerable GetChildNodes(this Node node)
{
- foreach (Node child in node.Children)
- {
- yield return child;
- }
+ return GetChildNodes((INode)node).Cast();
+ }
+
+ ///
+ /// Functionally similar to the XPath axis 'child'
+ /// Make the imediate Children LINQ queryable
+ /// Performance optimised for just imediate children.
+ /// taken from: http://our.umbraco.org/wiki/how-tos/useful-helper-extension-methods-%28linq-null-safe-access%29
+ ///
+ /// an umbraco.interfaces.INode object
+ /// INode as IEnumerable
+ public static IEnumerable GetChildNodes(this INode node)
+ {
+ return node.ChildrenAsList;
}
///
@@ -203,7 +322,18 @@ namespace umbraco
/// Nodes as IEnumerable
public static IEnumerable GetChildNodes(this Node node, Func func)
{
- foreach (Node child in node.Children)
+ return GetChildNodes((INode)node, (Func) func).Cast();
+ }
+
+ ///
+ /// Gets the child nodes.
+ ///
+ /// The umbraco.interfaces.INode.
+ /// The func.
+ /// INodes as IEnumerable
+ public static IEnumerable GetChildNodes(this INode node, Func func)
+ {
+ foreach (INode child in node.ChildrenAsList)
{
if (func(child))
{
@@ -219,6 +349,17 @@ namespace umbraco
/// The document type alias.
/// Nodes as IEnumerable
public static IEnumerable GetChildNodesByType(this Node node, string documentTypeAlias)
+ {
+ return GetChildNodesByType((INode)node, documentTypeAlias).Cast();
+ }
+
+ ///
+ /// Gets the child nodes by document-type.
+ ///
+ /// The umbraco.interfaces.INode.
+ /// The document type alias.
+ /// INodes as IEnumerable
+ public static IEnumerable GetChildNodesByType(this INode node, string documentTypeAlias)
{
return node.GetChildNodes(n => n.NodeTypeAlias == documentTypeAlias);
}
@@ -231,20 +372,18 @@ namespace umbraco
/// null or Node
public static Node GetChildNodeByName(this Node parentNode, string nodeName)
{
- Node node = null;
+ return (Node) GetChildNodeByName((INode)parentNode, nodeName);
+ }
- foreach (Node child in parentNode.Children)
- {
- if (child.Name == nodeName)
- {
- node = child;
- break;
- }
- }
-
- return node;
-
- //// return node.GetChildNodes(n => n.Name == nodeName);
+ ///
+ /// Extension method on Node to retun a matching child node by name
+ ///
+ /// an umbraco.interfaces.INode object
+ /// name of node to search for
+ /// null or INode
+ public static INode GetChildNodeByName(this INode parentNode, string nodeName)
+ {
+ return parentNode.ChildrenAsList.FirstOrDefault(child => child.Name == nodeName);
}
///
@@ -256,6 +395,19 @@ namespace umbraco
/// true if the specified node has property; otherwise, false.
///
public static bool HasProperty(this Node node, string propertyAlias)
+ {
+ return HasProperty((INode)node, propertyAlias);
+ }
+
+ ///
+ /// Determines whether the specified node has property.
+ ///
+ /// The INode.
+ /// The property alias.
+ ///
+ /// true if the specified node has property; otherwise, false.
+ ///
+ public static bool HasProperty(this INode node, string propertyAlias)
{
var property = node.GetProperty(propertyAlias);
return (property != null);
@@ -269,6 +421,18 @@ namespace umbraco
/// alias of property to get
/// default(T) or property cast to (T)
public static T GetProperty(this Node node, string propertyAlias)
+ {
+ return GetProperty((INode)node, propertyAlias);
+ }
+
+ ///
+ /// Get a value of type T from a property
+ ///
+ /// type T to cast to
+ /// an umbraco.interfaces.INode object
+ /// alias of property to get
+ /// default(T) or property cast to (T)
+ public static T GetProperty(this INode node, string propertyAlias)
{
// check to see if return object handles it's own object hydration
if (typeof(uQuery.IGetProperty).IsAssignableFrom(typeof(T)))
@@ -282,6 +446,8 @@ namespace umbraco
return (T)t;
}
+ //TODO: This should be converted to our extension method TryConvertTo ....
+
var typeConverter = TypeDescriptor.GetConverter(typeof(T));
if (typeConverter != null)
{
@@ -343,6 +509,17 @@ namespace umbraco
/// alias of propety to get
/// empty string, or property value as string
private static string GetPropertyAsString(this Node node, string propertyAlias)
+ {
+ return GetPropertyAsString((INode)node, propertyAlias);
+ }
+
+ ///
+ /// Get a string value for the supplied property alias
+ ///
+ /// an umbraco.interfaces.INode object
+ /// alias of propety to get
+ /// empty string, or property value as string
+ private static string GetPropertyAsString(this INode node, string propertyAlias)
{
var propertyValue = string.Empty;
var property = node.GetProperty(propertyAlias);
@@ -362,6 +539,17 @@ namespace umbraco
/// alias of propety to get
/// true if can cast value, else false for all other circumstances
private static bool GetPropertyAsBoolean(this Node node, string propertyAlias)
+ {
+ return GetPropertyAsBoolean((INode)node, propertyAlias);
+ }
+
+ ///
+ /// Get a boolean value for the supplied property alias (works with built in Yes/No dataype)
+ ///
+ /// an umbraco.interfaces.INode object
+ /// alias of propety to get
+ /// true if can cast value, else false for all other circumstances
+ private static bool GetPropertyAsBoolean(this INode node, string propertyAlias)
{
var propertyValue = false;
var property = node.GetProperty(propertyAlias);
@@ -390,6 +578,18 @@ namespace umbraco
///
///
public static int Level(this Node node)
+ {
+ return Level((INode)node);
+ }
+
+ ///
+ /// Tell me the level of this node (0 = root)
+ /// updated from Depth and changed to start at 0
+ /// to align with other 'Level' methods (eg xslt)
+ ///
+ ///
+ ///
+ public static int Level(this INode node)
{
return node.Path.Split(',').Length - 1;
}
@@ -400,6 +600,16 @@ namespace umbraco
/// The node.
/// Returns an XmlNode for the selected Node
public static XmlNode ToXml(this Node node)
+ {
+ return ToXml((INode) node);
+ }
+
+ ///
+ /// Gets the XML for the Node.
+ ///
+ /// The INode.
+ /// Returns an XmlNode for the selected Node
+ public static XmlNode ToXml(this INode node)
{
return ((IHasXmlNode)umbraco.library.GetXmlNodeById(node.Id.ToString()).Current).GetNode();
}
@@ -412,6 +622,18 @@ namespace umbraco
/// name of crop to get url for
/// emtpy string or url
public static string GetImageCropperUrl(this Node node, string propertyAlias, string cropName)
+ {
+ return GetImageCropperUrl((INode)node, propertyAlias, cropName);
+ }
+
+ ///
+ /// Returns the url for a given crop name using the built in Image Cropper datatype
+ ///
+ /// an umbraco.interfaces.INode object
+ /// property alias
+ /// name of crop to get url for
+ /// emtpy string or url
+ public static string GetImageCropperUrl(this INode node, string propertyAlias, string cropName)
{
string cropUrl = string.Empty;
@@ -453,6 +675,18 @@ namespace umbraco
/// value to set
/// the same node object on which this is an extension method
public static Node SetProperty(this Node node, string propertyAlias, object value)
+ {
+ return (Node) SetProperty((INode)node, propertyAlias, value);
+ }
+
+ ///
+ /// Sets a property value on this node
+ ///
+ /// an umbraco.interfaces.INode object
+ /// alias of property to set
+ /// value to set
+ /// the same node object on which this is an extension method
+ public static INode SetProperty(this INode node, string propertyAlias, object value)
{
var document = new Document(node.Id);
@@ -468,6 +702,17 @@ namespace umbraco
/// if true then publishes under the context of User(0), if false uses current user
/// the same node object on which this is an extension method
public static Node Publish(this Node node, bool useAdminUser)
+ {
+ return (Node) Publish((INode)node, useAdminUser);
+ }
+
+ ///
+ /// Republishes this node
+ ///
+ /// an umbraco.interfaces.INode object
+ /// if true then publishes under the context of User(0), if false uses current user
+ /// the same node object on which this is an extension method
+ public static INode Publish(this INode node, bool useAdminUser)
{
var document = new Document(node.Id);
@@ -484,6 +729,18 @@ namespace umbraco
/// Returns a random node from a collection of nodes.
///
public static Node GetRandom(this IList nodes)
+ {
+ return (Node)GetRandom(nodes.Cast().ToList());
+ }
+
+ ///
+ /// Gets a random node.
+ ///
+ /// The nodes.
+ ///
+ /// Returns a random INode from a collection of INodes.
+ ///
+ public static INode GetRandom(this IList nodes)
{
var random = umbraco.library.GetRandom();
return nodes[random.Next(0, nodes.Count)];
@@ -499,7 +756,21 @@ namespace umbraco
///
public static IEnumerable GetRandom(this IList nodes, int numberOfItems)
{
- var output = new List(numberOfItems);
+ var randomNodes = GetRandom(nodes.Cast().ToList(), numberOfItems);
+ return randomNodes.Cast().ToList();
+ }
+
+ ///
+ /// Gets a collection of random nodes.
+ ///
+ /// The nodes.
+ /// The number of items.
+ ///
+ /// Returns the specified number of random INodes from a collection of INodes.
+ ///
+ public static IEnumerable GetRandom(this IList nodes, int numberOfItems)
+ {
+ var output = new List(numberOfItems);
while (output.Count < numberOfItems)
{
@@ -519,6 +790,16 @@ namespace umbraco
/// The node.
///
public static string GetFullNiceUrl(this Node node)
+ {
+ return GetFullNiceUrl((INode)node);
+ }
+
+ ///
+ /// Gets the full nice URL.
+ ///
+ /// The node as INode.
+ ///
+ public static string GetFullNiceUrl(this INode node)
{
if (!string.IsNullOrEmpty(node.NiceUrl) && node.NiceUrl[0] == '/')
{
@@ -535,6 +816,17 @@ namespace umbraco
/// The language.
///
public static string GetFullNiceUrl(this Node node, string language)
+ {
+ return GetFullNiceUrl((INode)node, language);
+ }
+
+ ///
+ /// Gets the full nice URL.
+ ///
+ /// The node as INode.
+ /// The language.
+ ///
+ public static string GetFullNiceUrl(this INode node, string language)
{
return node.GetFullNiceUrl(language, false);
}
@@ -547,6 +839,18 @@ namespace umbraco
/// if set to true [SSL].
///
public static string GetFullNiceUrl(this Node node, string language, bool ssl)
+ {
+ return GetFullNiceUrl((INode)node, language, ssl);
+ }
+
+ ///
+ /// Gets the full nice URL.
+ ///
+ /// The node as INode.
+ /// The language.
+ /// if set to true [SSL].
+ ///
+ public static string GetFullNiceUrl(this INode node, string language, bool ssl)
{
foreach (var domain in library.GetCurrentDomains(node.Id))
{
@@ -566,6 +870,17 @@ namespace umbraco
/// The domain.
///
public static string GetFullNiceUrl(this Node node, Domain domain)
+ {
+ return GetFullNiceUrl((INode)node, domain);
+ }
+
+ ///
+ /// Gets the full nice URL.
+ ///
+ /// The node as INode.
+ /// The domain.
+ ///
+ public static string GetFullNiceUrl(this INode node, Domain domain)
{
return node.GetFullNiceUrl(domain, false);
}
@@ -578,6 +893,18 @@ namespace umbraco
/// if set to true [SSL].
///
public static string GetFullNiceUrl(this Node node, Domain domain, bool ssl)
+ {
+ return GetFullNiceUrl((INode)node, domain, ssl);
+ }
+
+ ///
+ /// Gets the full nice URL.
+ ///
+ /// The node as INode.
+ /// The domain.
+ /// if set to true [SSL].
+ ///
+ public static string GetFullNiceUrl(this INode node, Domain domain, bool ssl)
{
// TODO: [OA] Document on Codeplex
if (!string.IsNullOrEmpty(node.NiceUrl) && node.NiceUrl[0] == '/')
@@ -590,6 +917,7 @@ namespace umbraco
#pragma warning disable 0618
+
///
/// Converts legacy nodeFactory collection to INode collection
///