Custom Application Development Examples
This project is a sample for developing custom tabs, custom workflow external clients, and custom UI for Dynamic Execute. The following are only examples. This solution should not be modified or deployed. As with the Automated_Task_Standard_Operations.csproj, the CMS site instance uses this project's compiled output via an MEF-based, late-binding system.
Except for the Ingeniux CMS references, all references in the project are NuGet packages. The package definitions are in place, but to save space, actual packages are not included in the installer. Before building the project the first time, restoring the packages is recommended.
Plug-in applications are ancillary apps that are developed for use with Ingeniux CMS. The plug-in application system assumes the plug-in application is based on ASP.NET MVC 4. You can still use WebForms or non-ASP.NET technologies, but the resulting application won't be able to use CMS application session objects.
CMSControllerBase Class
Because the CMS plug-in system locates plug-in applications via MVC routing, every plug-in application must start with a controller.
CMS plug-in system uses Managed Extensibility Framework (MEF) to lazy-load types exported
in all plug-in folders, creating a controller instance in real time based on the URL of the
application. The base type the plug-in system expects is
CMSControllerBase
.
The CMSControllerBase
class contains important members that are used to
retrieve information of the CMS application and user session context.
- The
_Common
field wraps up all the necessary information on the CMS user context. - The
_ContentStore
field is the connection to the back-end database (Singleton object). - The
_CurrentUser
field is used to open sessions. - The
_XmlFolderLocation
field is location of the XML folder. - The
_L10NProvider
field is for retrieving localized strings for specific UI languages. - The
_InitializationException
field indicates whether or not has failed to initialize. If it is not null, the initialization failed.
Use OpenReadSession
and OpenWriteSession
to open session
to retrieve and manipulate objects. Objects only reside in each session and are disposed
upon session disposal.
CustomTabController Class
CustomTabController
is the base class for controllers in custom tab
applications. All custom tab controllers must derive from it. It is derived from
CMSControllerBase
.
The CMSContext
property of this class contains the environmental context
of custom tab applications. It is derived from CMSControllerUrlContext
class.
This model class also provides support methods to retrieve context objects, like Page and Publishing Target.
DynamicExecuteInterfaceApplicationController Class
DynamicExecuteInterfaceApplicationController
is also derived from
CMSControllerBase. It is the base controller for Dynamic Execute User Interface
applications.
This controller contains the ElementData
property, which is the object
representation of the client-side JavaScript model for data of a element field. In this
case, it's the data of a Dynamic Execute field.
Since Dynamic Execute fields change all elements from the original schema into attributes,
the childElements
field is normally empty or null.
WorkflowClientApplicationController Class
WorkflowClientApplicationController
is also derived from
CMSControllerBase
. It is the base controller for Workflow External Client
applications.
The TransitionContext
property contains all the information on the page's
workflow status and transition.
Custom Plug-in Applications by Example
The path [cms-site-instance]\site\App_Data\xml\Custom\SampleApp includes three custom applications, serving as a starting point for your customized plug-in apps.
See the three custom applications below for reference.