Implements U4-1500 Make sure doctype import/export and packager can set root doctypes
This commit is contained in:
@@ -714,6 +714,15 @@ namespace umbraco.cms.businesslogic.packager
|
||||
dt.Thumbnail = xmlHelper.GetNodeValue(n.SelectSingleNode("Info/Thumbnail"));
|
||||
dt.Description = xmlHelper.GetNodeValue(n.SelectSingleNode("Info/Description"));
|
||||
|
||||
// Allow at root (check for node due to legacy)
|
||||
bool allowAtRoot = false;
|
||||
string allowAtRootNode = xmlHelper.GetNodeValue(n.SelectSingleNode("Info/AllowAtRoot"));
|
||||
if (!String.IsNullOrEmpty(allowAtRootNode))
|
||||
{
|
||||
bool.TryParse(allowAtRootNode, out allowAtRoot);
|
||||
}
|
||||
dt.AllowAtRoot = allowAtRoot;
|
||||
|
||||
// Templates
|
||||
ArrayList templates = new ArrayList();
|
||||
foreach (XmlNode tem in n.SelectNodes("Info/AllowedTemplates/Template"))
|
||||
|
||||
@@ -348,6 +348,7 @@ namespace umbraco.cms.businesslogic.web
|
||||
info.AppendChild(XmlHelper.AddTextNode(xd, "Icon", IconUrl));
|
||||
info.AppendChild(XmlHelper.AddTextNode(xd, "Thumbnail", Thumbnail));
|
||||
info.AppendChild(XmlHelper.AddTextNode(xd, "Description", Description));
|
||||
info.AppendChild(XmlHelper.AddTextNode(xd, "AllowAtRoot", AllowAtRoot.ToString()));
|
||||
|
||||
//TODO: Add support for mixins!
|
||||
if (this.MasterContentType > 0)
|
||||
|
||||
Reference in New Issue
Block a user