Skip to content

Subpages, sidebars and windows

thepian edited this page Apr 9, 2013 · 6 revisions

body contents in separate page

<body src="/pages/default-layout.html">

By adding a src or data-src attribute to the body element additional content will be appended to the body. Alternate subpages can be switched in and out of the body element. Before switching to another you should call loadPage to have the contents ready.

Loaded pages

Subordinate page sources are loaded in Resolver("page::pages"). This can be done by configuration using

<script type="application/config">
loadPage("/pages/default-layout.html");
</script>

If you want to load a page into a document level element such as article,section,aside you can do so using role application, complimentary, main, dialog. In the config set the src.

<script type="application/config">
declare("main-stage",{
  "src": "/pages/default-layout.html"
});
</script>

The benefits of using subpages is that roles and layouters can be configured within the subpage.

Note that subpage loading is different from the element it is used in. This allows subpages to be used in multiple elements.

Clone this wiki locally