using System;
using CMS.GlobalHelper;
using CMS.UIControls;
public partial class CMSModules_Content_Controls_SplitView_Documents_DocumentSplitView : CMSUserControl
{
#region "Properties"
///
/// URL of the first frame.
///
public string Frame1Url
{
get
{
return splitView.Frame1Url;
}
set
{
splitView.Frame1Url = value;
}
}
///
/// URL of the second frame.
///
public string Frame2Url
{
get
{
return splitView.Frame2Url;
}
set
{
splitView.Frame2Url = value;
}
}
///
/// Identifier of the document to work with.
///
public int DocumentID
{
get;
set;
}
///
/// Identifier of the node to work with.
///
public int NodeID
{
get;
set;
}
///
/// Culture code identifiyng culture version of node.
///
public string Culture
{
get;
set;
}
#endregion
#region "Methods"
protected void Page_Load(object sender, EventArgs e)
{
bool hasNodeIdAndCulture = ((NodeID > 0) && (Culture != null));
if (hasNodeIdAndCulture)
{
// Toolbar URL
string toolbarUrl = "~/CMSModules/Content/CMSDesk/SplitView/Toolbar.aspx";
toolbarUrl = URLHelper.AddParameterToUrl(toolbarUrl, "nodeid", NodeID.ToString());
toolbarUrl = URLHelper.AddParameterToUrl(toolbarUrl, "culture", Culture);
// Separator URL
splitView.SeparatorUrl = "~/CMSModules/Content/CMSDesk/SplitView/Separator.aspx";
splitView.ToolbarUrl = toolbarUrl;
splitView.ToolbarHeight = 35;
}
}
#endregion
}