Editing the Header and Footer With Drupal Canvas
How to edit and change the header and footer of a Vartheme BS5 site in its Drupal Canvas page template, without writing any code.
Varbase ships with Drupal Canvas, a visual page builder, and the Vartheme BS5 (Bootstrap 5) base theme. With Drupal Canvas you can edit the site Header and Footer directly in the browser, with no code and no template overrides. The header and footer belong to a page template: a change you publish to the template appears on every page that uses it.
This page explains where the page template comes from, how to open it in the editor, edit the header and footer components, and publish the result.
Before You Begin
A working Varbase site (Varbase 11 or later) with the Drupal Canvas module enabled.
Vartheme BS5 set as the default theme (Administration \ Appearance \ Vartheme BS5).
A user account with the Administer page template permission (see Permissions below). The Site Admin and Super Admin roles have it by default.
Permissions
Creating and editing page templates, and choosing the site default, needs one permission in the Drupal Canvas group:
Administer page template
administer page template
Create and edit the page templates that render pages, and choose the site default.
Grant it at Administration \ People \ Permissions (/admin/people/permissions/module/canvas), in the Drupal Canvas group.
For a role without this permission, such as Content editor, the editor still requests /canvas/api/v0/settings/default-page-variant, which answers 403, and the browser console logs "RTK Query error: ... The 'administer page template' permission is required." The editor works normally; allow the message if your automated tests fail on console errors.
The Vartheme BS5 Page Template
The page template is created when Drupal Canvas is turned on for the theme.
Navigate to Administration \ Appearance \ Settings Vartheme BS5 (
/admin/appearance/settings/vartheme_bs5).In the Drupal Canvas section, make sure Use Drupal Canvas for page templates in this theme. is on.
Click Save configuration.

Saving with the option on creates the Vartheme_bs5 theme page template from the theme's current header and footer and makes it the site default.
Opening the Page Template
The page template is opened from inside any page editor.
Navigate to Administration \ Content \ Pages and open a Drupal Canvas page (for example, the Home page) in the editor, or go to
/canvas/editor/canvas_page/<id>.Wait for the editor to finish loading. The page preview shows the Header at the top and the Footer at the bottom, exactly as visitors see them.

Open the page template in one of two ways:
In the left toolbar, click the Layers icon. The page's Content tree sits under a locked layer named after its page template, Vartheme_bs5 theme. Click that layer.
In the left toolbar, open the Templates panel. Under Page templates, click Vartheme_bs5 theme (marked Default).


On a page, the header and footer components are shown but locked. They are edited only in the page template, so a change there applies to every page that uses it. The Page template setting in a page's Page data panel chooses which template renders that page.
Editing the Header
In the page template, the Header holds a Section with the Site Branding logo, the Main navigation menu and the search toggle.
In the Layers panel of the page template, expand Header.
Click any component inside the header (for example, the Site Branding logo or the Main navigation menu) to select it.
Use the settings panel on the right to change the component's properties, or use the Library (the + icon) to add a new component into the header.
Drag components in the Layers panel to reorder them, or use a component's context menu (…) to Duplicate or Delete it.
Example: Adding a Red Outline Donate Button Before the Header Menu
This example drags a ready-made Button component into the header, places it before the Main navigation menu, and styles it as a red outline button.
Open the Vartheme_bs5 theme page template, then open the Library (the + icon) and search for Button.
Drag the Button component into the header and drop it before the Main navigation menu. Drupal Canvas shows a drop indicator as you drag.
Select the new button and change its props in the Settings panel:
Variant → Danger (red)
Outline → On (uses the Bootstrap
btn-outline-*style)Size → Small (
btn-sm)Label →
DonateLink URL →
/donate
Click Publish.


Editing the Footer
In the page template, the Footer holds two Section components with the footer, secondary and social media menus.
In the Layers panel of the page template, expand Footer.
Edit the footer the same way as the header: select a component to change its settings, add new components from the Library, reorder them in the Layers panel, or remove them.
Example: Adding a Newsletter Webform Under the Footer Social Menu
This example places the Newsletter Subscribe webform in the footer, under the social media links menu, so visitors can sign up from any page.
Open the Vartheme_bs5 theme page template and expand Footer in the Layers panel.
From the Library, drag a Webform block into the same column as the Social media menu, dropping it under that menu.
Select the webform block and, in the Settings panel, set Webform → Newsletter Subscribe (optionally show a title such as Subscribe to Our Newsletter).
Click Publish.


Publishing Your Changes
Drupal Canvas saves your work as an auto-saved draft while you edit. The changes are not live until you publish them.
Click Review changes in the top bar to see what changed.
Click Publish to make the new header and footer live on every page that uses the page template.
Related Documentation
Understanding Vartheme BS5Creating Your Own ThemeLast updated