Linking between pages must also be done using the template variables: The links have to be generated in different ways when using in online or static mode.
Linking using the template variables is quite easy:
<a href="{$pages.usage.link}">{$pages.usage.title}</a>
outputs a link to the usage
page, while
<a href="{$pages.usage.subpages.writing.link}">{$pages.usage.subpages.writing.title}</a>
links to the subpage writing
of page usage
.
Of course the actual page / subpage variables can also be used:
<a href="{$sub.link}">{$sub.title}</a>
links to the actual page's actual sub-page,
or <a href="{$page.subpages.writing.link}">{$page.subpages.writing.title}</a>
links to a specific subpage of the actual page.
Static resources like images, javascript files and other non-dynamic resources can also easily be linked:
Example:
The Page Bakery contains the famous jQuery javascript library, stored under [pagebakery-root]/static/js/jquery-1.8.2.min.js
. To refer to the library within a page or the layout, just use static/js/jquery-1.8.2.min.js
<script src="static/js/jquery-1.8.2.min.js"></script>