The Microsoft.ContentManagement.Publishing
namespace contains the core classes that are used heavily throughout an MCMS site. The first item you need to be familiar with is the CmsHttpContext
class.
MCMS creates a CmsHttpContext
object for every request to a posting or channel. The object lasts for the length of a single request. When the user navigates away to another page, another instance of CmsHttpContext
is created.
You can never programmatically create new instances of the CmsHttpContext
object, but you can get a reference to the current one. The CmsHttpContext
object is important as it is used by the PAPI as the entry point to other objects like channels, postings, template galleries, templates, resource galleries, and resources.
The following diagram shows how the principal MCMS objects can be accessed from the CmsHttpContext
object. Directly from the CmsHttpContext
object, you can access the root channel, root template gallery, and root resource gallery objects....