LemonStand Version 1 Has Been Discontinued
This documentation is for LemonStand Version 1. LemonStand is now offered as a cloud-based eCommerce platform.
You can try the new LemonStand and learn about upgrading here.
Using the Page Head Declarations Field
The Head Declarations field on the Create/Edit Page form (the Head & Blocks tab) allows you to separate page-specific HEAD declarations from the common templates code. In this field you can define code which you want to be rendered in the page HEAD element - for example SCRIPT or CSS resource references. Then you can output the content defined in the field using the $this->render_head() call in your page templates.
You can invoke the $this->render_head() method inside page templates, pages and partials. Example page Head content:
Example layout code:
<html> <head> <title><?= h($this->page->title) ?></title> <? $this->render_head() ?> </head> <body> <? $this->render_page() ?> </body> </html>
<html> <head> <title>{{ this.page.title }}</title> {{ render_head() }} </head> <body> {{ render_page() }} </body> </html>
See also:
- Cms_Controller class
Next: Using the Page Blocks Feature
Previous: Creating a Partial
Return to The Page Basics