Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Template definition

required

Excerpt Include
Template definition
Template definition
nopaneltrue

Template script

required

Excerpt Include
Template scripts
Template scripts
nopaneltrue

Dialog definition

optional

Excerpt Include
Dialog definition
Dialog definition
nopaneltrue

Model

optional

The model is a JavaBean implementing

Javadoc
0info.magnolia.rendering.model.RenderingModel
. Use it to implement complex logic. The model can execute any Java code to retrieve data from the repository or from an external source. The results are available to the template script for rendering on the page.

Hide block

optional

The model can be implemented in Java or via JavaScript. Use models to implement complex logic. The results are available to the template script for rendering on the page.

A Java model is a bean implementing

Javadoc resource link
classNameinfo.magnolia.rendering.model.RenderingModel
renderTypeasynchronous
. The model can execute any Java code to retrieve data from the repository or from an external source.

In order to use JavaScript models, make sure the Magnolia instance contains the JavaScript Models module.

Info

If developing a In the context of developing Single-page applicationPage Applications, templating takes form of building Angular or ReactJS components, which are compiled into a single HTML page. On the Magnolia side, the rendering of the page is handled by the SPA renderer and the associated SPA helper libraries.

For an overview, see the Single-page applications page.

...