Skip to content

Latest commit

 

History

History

templates

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Templates

Modules in this directory with the following syntax will be chunked and loaded on-demand for corresponding Kirby templates.

export default () => {
  // Do something
};

How?

We simply add the current template name to the body tag and then lazily import the asset chunk which name equals the template name.

<body data-template="<?= $page->intendedTemplate()->name() ?>">