The Page Bakery! © 2012 alex schenkel

Linking between pages

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.

Linking to static resources

Static resources like images, javascript files and other non-dynamic resources can also easily be linked:

  • Place them somewhere within the pagebakery's root and
  • place a relative link to it.

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

as reference, e.g.:
<script src="static/js/jquery-1.8.2.min.js"></script>

© 2012 alexi.ch
Version 1.0 | 2012-10-13