Engine variable
The engine gives you access to Content Manager items and detailed information on the current publish action for which this template is executed.
The engine variable gives you access to the following data:
GetSession()- Entry point to all the content of the Content Manager.
GetObject()-
Use
engine.GetSession().GetObject()to retrieve objects from the Content Manager. PublishingContext-
From your Template Building Block, you can not only access the content-related items in the Content Manager, but also the publishing context in which the current template is being executed. In this publishing context, you can see and sometimes modify various aspects of the publishing process:
- Viewing or changing the code page
-
If you want to check which code page is used during the publishing process, access
Engine.PublishingContext.RenderedItem.CodePage. You can also force a code page override (this is normally done outside the template) by modifying the value. - Finding out the Publication Target
-
To find out which Publication Target is being used, access
Engine.PublishingContext.PublicationTarget. This gives you the Publication Target object. - Examining the publish transaction
-
By accessing
Engine.PublishingContext.RenderContext.PublishTransaction, you can access the various properties of the current publish transaction. This property gives you access to, for example, the identity of the user who initiated this publish transaction, or the priority with which this publish transaction was submitted. - Finding out if BluePrinting is considered
-
To find out whether the publish or unpublish action propagates down to Child Publications, check the following property:
Engine.PublishingContext.PublishInstruction.ResolveInstruction.IncludeChildPublications. - Finding out if Workflow rules are considered
-
To find out whether the publish or unpublish action takes Workflow rules into account, check the following property:
Engine.PublishingContext.PublishInstruction.ResolveInstruction.IncludeWorkflow.
RenderComponentPresentation()- Renders a Component Presentation. This method is typically used in Adobe Dreamweaver Template Building Blocks.