Skip to main content


class ZMbasics.Tutorial1.Template extends %ZEN.Mojo.Component.contentTemplate

This is the template for the ZM page ZMbasics.Tutorial1.HomePage. The ZM page invokes its page method getContent(), which in turn invokes the onGetContent() method of this class (the associated template class). Depending on the first argument (pProviderName), onGetContent() either:

Next tutorial in the series: ZMbasics.Tutorial2.HomePage.

Method Inventory


parameter DOMAIN = Zen Mojo Demo;
Localization domain; best practice is to always specify this
parameter NAMESPACE =;
Each template class must have a unique combination of short class name and NAMESPACE parameter.


clientmethod myGetMainViewLayout(key, criteria) [ Language = javascript ]
Method used to get layout information for the mainView component.

This method must create and return a JS object with layout information. Specifically, the JS object has a set of children, each of which corresponds to a block on the page. To create this JS object, it is necessary to know only the following:

  • Syntax to create a JS object.
  • The available layout objects to use as children.
  • The properties that you can set for these layout objects.
  • The syntax for referring to the available data. (Not applicable here.)
clientmethod onGetContent(providerName, key, criteria) [ Language = javascript ]
Implementation of callback. This client-side method is called by the page method getContent(). If providerName is the name of a layout object, this method invokes myGetMainViewLayout() and returns the result. Otherwise, this method returns null, which means that ZM calls the %OnGetJSONContent() of this template (thus going to the server instead).

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab