AdvantagePageTemplate..::..RenderMode Property
Gets the render mode of the current request.
This function may allows you the developer to make decisions based on the context of the page.
For example:
In visual edit or preview mode, you may want to select an object if you are using a rewrite object.
If the page is protected, you may want to allow the searchagent access to index the page.
Namespace:
AdvantageCMS.Core.Common.BaseClassesAssembly: AdvantageCMS.Core (in AdvantageCMS.Core.dll)
Syntax
public eAdvantagePageRenderMode RenderMode { get; }
Field Value
enumeration value of : Normal, Preview, Edit, SearchAgentExamples
Determine how the page was render
C#
switch (this.RenderMode) { case eAdvantagePageRenderMode.Preview: //Page was called by preview mode break; case eAdvantagePageRenderMode.SearchAgent: //Page was called the search indexer break; case eAdvantagePageRenderMode.Edit: //Page was rendered inside the inline edit. break; case eAdvantagePageRenderMode.Normal: //Normal operation break; }