Implements U4-1500 Make sure doctype import/export and packager can set root doctypes

This commit is contained in:
NielsHartvig@UMBRACORATI.localdomain
2013-01-18 11:54:55 -01:00
parent 035a09afba
commit caea28afd0
2 changed files with 10 additions and 0 deletions

View File

@@ -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"))

View File

@@ -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)