private void FillSitePath()
{
int CatalogValue = -1;
if (!string.IsNullOrEmpty(CMSConfig.QueryString.CatalogID))
{
int.TryParse(Request.QueryString[CMSConfig.QueryString.CatalogID], out CatalogValue);
}
string xslPath = CMSWebHelper.GetXSLTemplateFilePath(base.XSLTemplateID);
xslPath = XSLTemplateManager.GetXSLTemplatePath(xslPath, base.XSLTemplateID);
XmlDocument xmlDoc = new XmlDocument();
XmlElement rootElement = xmlDoc.CreateElement("Root");
xmlDoc.AppendChild(rootElement);
if (CatalogValue > 0)
{
Catalog Catalog = CatalogManager.GetCatalog(CatalogValue, CMSContext.LanguageID);
if (Catalog != null)
{
FillCatalogsXML(Catalog, xmlDoc, rootElement);
XsltArgumentList arguments = new XsltArgumentList();
arguments.AddExtensionObject("CMS:UserControl", this);
xmlCatalog.DocumentContent = xmlDoc.OuterXml;
xmlCatalog.TransformSource = xslPath;
xmlCatalog.TransformArgumentList = arguments;
xmlCatalog.DataBind();
}
}
}