EfficiencySpring's Content Manager toolset provides the ability to display web pages stored in the content database table.
There are times, however, when more dynamic functionality and data needs to be incorporated into content pages. EfficiencySpring provides a customization framework for Content Manager, structured in the following ways:
The EfficiencyCommon.ContentManager.ContentPage class is inherited into the customizable EfficiencyCommonC.ContentPage class, which is located in the \app_code folder. The derived class contains functions that can override and add onto the functionality of the base class. Below is a list of customizable functions.
Function/Subroutine | Purpose |
EfficiencyCommonC.ContentPage | |
New | Constructor |
GetContentToDisplay | Retrieves and preps content from the content table. This wrapper function can conduct alternations to the string retrieved from the base class before it returns the string itself. |
The EfficiencySpringPage class, which is inherited into every EfficiencySpring web page, contains an instance of the EfficiencyCommonC.CoreObjectFactory class. This class contains a function for creating the EfficiencyCommonC.ContentPage object. It can be updated in the CoreObjectFactory.vb file, located in the \app_code folder. This function, CreateNewContentPageObject, is utilized everywhere in the aspx codebase for creating ContentPage objects. The function can be updated to instantiate customized versions of the class as opposed to the standard ContentPage class. For example:
Public Function CreateNewContentPageObject( _ ByVal PageID As Integer, _ ByRef rpLocal As ReaderProvider, _ ByRef PageVersion As String, _ ByRef PushUpdate As Boolean) As EfficiencyCommonC.ContentPage Return New EfficiencyCommonC.ContentPage( _ PageID, _ rpLocal, _ PageVersion, _ PushUpdatecls, _ Me, _ ) End Function
might be updated to return a customized class in a certain scenario.
Public Function CreateNewContentPageObject( _ ByVal PageID As Integer, _ ByRef rpLocal As ReaderProvider, _ ByRef PageVersion As String, _ ByRef PushUpdate As Boolean) As EfficiencyCommonC.ContentPage If PageId = 5 Then Return New EfficiencyCommonC.CustomizedContentPageClass( PageID, _ rpLocal, _ PageVersion, _ PushUpdate, _ Me) End If Return New EfficiencyCommonC.ContentPage( _ PageID, _ rpLocal, _ PageVersion, _ PushUpdate, _ Me, _ ) End Function