LiveWhale

Welcome, Guest Login

Support Center

Adding a page template

Last Updated: May 06, 2015 12:02PM PDT

Any editable page can be turned into a template to create new pages by flagging it. If a new template is being created from scratch outside of LiveWhale, it must also satisfy the same criteria.

  1. While on the web page, click the "Details" tab and click "Edit page details" or find the page details in the backend via a navigation item or the "File Browser".

  2. In the page details, either the current template will be noted, you can choose a new template, or if the page’s markup is different, then you will see a checkbox to "Use this page as a template". If you are not seeing the checkbox, then the page is not significantly different than the template already referenced.


Beginning with LiveWhale 1.5.0, the CMS automatically relates pages to templates even if they were created outside of LiveWhale by matching the page markup to template markup. In this template-matching process, LiveWhale only considers content outside of editables, excluding the <title /> and <meta /> values for the page description and keywords, which naturally vary page-to-page. Thus, you should make any markup changes prior to attempting to make a page into a new template. (Adding a hard-coded body class should be sufficient if nothing else.)

NOTE: If a page is not valid XHTML, it cannot be used as a template. In such cases, a warning will be displayed, preventing you from checking the template checkbox. This is designed to guard against XHTML markup errors spreading throughout the site. In most cases the errors can be easily resolved. Click the “Why?” link next to “Page is not valid XHTML” to view the errors that must be fixed before the page can be marked as a template.

Finally, do note that templates which might be shared for multiple LiveWhale hosts must be marked as templates on every host for which you’d like them to be available.


The best practice way of creating a page template


While any page can be made into a template, the best practices way of creating a template is by creating a template that is not for public consumption. For example, try to avoid making an actual web page that is publicly viewable a template (ie,. admissions/index.php) just in case you want to make changes, remove the template, or move it. 
 

1) Create new page from template A

2) Source edit new child page of template A

3) Now it is no longer a child page of template A

4) Flag it as template B

eb8f96c071020d8b0923da726d6cab65@livewhale.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete