A page template is a reusable, full-page layout that surrounds the content of your pages in Drupal Canvas. A page template usually contains your site header, navigation, and footer, and a placeholder that marks where the content of each page displays.
Page templates replace global regions. Instead of one header and footer that every page shares, you can create several page templates and select which page template each page or content template uses.
Prerequisites
Users with the Administer page template permission can create, edit, rename, duplicate, and delete page templates, set the site default, and select page templates for content types. Users without this permission do not see the Templates panel. Users who can edit a page can select a page template for that page without this permission. For more information, visit Managing roles and permissions.
How page templates work
Page templates follow these rules:
Site default: One page template is the site default. Pages and content templates that do not have a page template selected use the site default. In the Templates panel, the site default displays a Default badge.
Per page: Content editors can select a different page template for an individual Drupal Canvas page. The change displays on your site after you publish the page.
Per content template: Site builders can select a page template for a content template. All content of that type then uses the page template. Upon publish, these changes take effect immediately.
Reuse: When you edit and publish a page template, the change displays on every page that uses the page template.
The following table lists the parts of a page in Drupal Canvas:
S.No
Term
Description
1
Page template
The full-page layout around page content, such as the header, navigation, and footer.
2
Page content placeholder
The position in a page template where the content of each page displays. Drupal Canvas adds the placeholder to every page template automatically. You cannot remove the placeholder or add a second one.
3
Page
A single page that can include multiple components and a predefined set of structured fields, such as title, meta description, and meta image.
4
Components
Individual content elements placed within pages and page templates.
Use cases
You can use page templates for the following scenarios:
Standard pages: A page template with the full header, navigation, and footer for most pages of your site.
Conversion landing pages: A page template without a header or footer, so that visitors focus on a single call to action.
Homepage with navigation overlay: A page template in which the navigation displays on top of the hero area.
Global regions and page templates
Source CMS manages site header and footer regions through a default page template to preserve consistent page presentation. To modify your header or footer, select Templates in the sidebar of Drupal Canvas, and edit the page template that displays the Default badge in the Page templates section.
Note
If your site connects to GitHub, Drupal Canvas commits the default page template to your connected repository. For more information, visit GitHub sync.
Page templates and GitHub sync
GitHub sync includes page templates. When you publish a page template in Drupal Canvas, the system commits the page template to your connected repository. Changes to page templates that you push to the repository synchronize back to your site. The Drupal Canvas CLI pull and push commands also synchronize page templates.
Page templates
A page template is a reusable, full-page layout that surrounds the content of your pages in Drupal Canvas. A page template usually contains your site header, navigation, and footer, and a placeholder that marks where the content of each page displays.
Page templates replace global regions. Instead of one header and footer that every page shares, you can create several page templates and select which page template each page or content template uses.
Prerequisites
Users with the Administer page template permission can create, edit, rename, duplicate, and delete page templates, set the site default, and select page templates for content types. Users without this permission do not see the Templates panel. Users who can edit a page can select a page template for that page without this permission. For more information, visit Managing roles and permissions.
How page templates work
Page templates follow these rules:
Site default: One page template is the site default. Pages and content templates that do not have a page template selected use the site default. In the Templates panel, the site default displays a Default badge.
Per page: Content editors can select a different page template for an individual Drupal Canvas page. The change displays on your site after you publish the page.
Per content template: Site builders can select a page template for a content template. All content of that type then uses the page template. Upon publish, these changes take effect immediately.
Reuse: When you edit and publish a page template, the change displays on every page that uses the page template.
The following table lists the parts of a page in Drupal Canvas:
S.No
Term
Description
1
Page template
The full-page layout around page content, such as the header, navigation, and footer.
2
Page content placeholder
The position in a page template where the content of each page displays. Drupal Canvas adds the placeholder to every page template automatically. You cannot remove the placeholder or add a second one.
3
Page
A single page that can include multiple components and a predefined set of structured fields, such as title, meta description, and meta image.
4
Components
Individual content elements placed within pages and page templates.
Use cases
You can use page templates for the following scenarios:
Standard pages: A page template with the full header, navigation, and footer for most pages of your site.
Conversion landing pages: A page template without a header or footer, so that visitors focus on a single call to action.
Homepage with navigation overlay: A page template in which the navigation displays on top of the hero area.
Global regions and page templates
Source CMS manages site header and footer regions through a default page template to preserve consistent page presentation. To modify your header or footer, select Templates in the sidebar of Drupal Canvas, and edit the page template that displays the Default badge in the Page templates section.
Note
If your site connects to GitHub, Drupal Canvas commits the default page template to your connected repository. For more information, visit GitHub sync.
Page templates and GitHub sync
GitHub sync includes page templates. When you publish a page template in Drupal Canvas, the system commits the page template to your connected repository. Changes to page templates that you push to the repository synchronize back to your site. The Drupal Canvas CLI pull and push commands also synchronize page templates.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.