A context object that gives access to the underlying Jahia Java objects that are part of the current rendering context

interface ServerContext {
    bundleKey: string;
    currentNode: JCRNodeWrapper;
    currentResource: Resource;
    mainNode: JCRNodeWrapper;
    renderContext: RenderContext;
}

Properties

bundleKey: string

The OSGi bundle key of the current module being rendered

currentNode: JCRNodeWrapper

The current JCR node being rendered

currentResource: Resource

The current resource being rendered, which is a combination of the current node and its template/view information

mainNode: JCRNodeWrapper

The main JCR node being rendered, which is the root node of the current page

renderContext: RenderContext

Jahia's rendering context, it provides access to all kinds of context information, such as the current request, response, user, mode, mainResource and more