using System;
using System.Web.UI.WebControls;
using CMS.ExtendedControls;
using CMS.UIControls;
public partial class CMSMasterPages_UI_SimplePage : CMSMasterPage
{
#region "Properties"
///
/// PageTitle control.
///
public override PageTitle Title
{
get
{
return titleElem;
}
}
///
/// HeaderActions control.
///
public override HeaderActions HeaderActions
{
get
{
if (base.HeaderActions != null)
{
return base.HeaderActions;
}
return actionsElem.HeaderActions;
}
}
///
/// Body element control
///
public override System.Web.UI.HtmlControls.HtmlGenericControl Body
{
get
{
return bodyElem;
}
}
///
/// Gets the top panel.
///
public override Panel PanelHeader
{
get
{
return pnlContainer;
}
}
///
/// Body panel.
///
public override Panel PanelBody
{
get
{
return pnlBody;
}
}
///
/// Gets the content panel.
///
public override Panel PanelContent
{
get
{
return pnlContent;
}
}
///
/// Gets the labels container.
///
public override PlaceHolder PlaceholderLabels
{
get
{
return plcLabels;
}
}
///
/// Gets UIPlaceHolder which wraps up HeaderActions and allows to modify visibility of its children.
///
public override UIPlaceHolder HeaderActionsPlaceHolder
{
get
{
return plcActionsPermissions;
}
}
///
/// Prepared for specifying the additional HEAD elements.
///
public override Literal HeadElements
{
get
{
return ltlHeadElements;
}
set
{
ltlHeadElements = value;
}
}
///
/// Gets placeholder located after form element.
///
public override PlaceHolder AfterFormPlaceholder
{
get
{
return plcAfterForm;
}
}
#endregion
#region "Page Events"
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
PageStatusContainer = plcStatus;
bodyElem.Attributes["class"] = mBodyClass;
}
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
// Display panel with additional controls place holder if required
if (DisplayControlsPanel != pnlAdditionalControls.Visible)
{
pnlAdditionalControls.Visible = DisplayControlsPanel;
}
// Display panel with site selector
if (DisplaySiteSelectorPanel != pnlSiteSelector.Visible)
{
pnlSiteSelector.Visible = DisplaySiteSelectorPanel;
}
}
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
// Hide actions panel if no actions are present
if (!HeaderActions.Visible && (plcActions.Controls.Count == 0) && (plcBeforeActions.Controls.Count == 0))
{
pnlActions.Visible = false;
}
base.Render(writer);
}
#endregion
}