---
title: Modifying page templates
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

Now you will learn how to work with the layouts of portal engine page templates.

1. Open the **Pages** application.
2. Select the **Home** page in the content tree.
3. Switch to the **Design** tab.

Here you can see the the structure of the home page template. The page header and main menu are inherited from the root page. The "active" area, designated by a green header, contains the orange web part zones and instances of web parts.

![Editing a page template on the Design tab](https://docs.kentico.com/docsassets/k82tutorial/modifying-page-templates/Design_Callouts.png "Editing a page template on the Design tab")

The page is based on the page template _**Corporate Site - Home page**_. The page template consists of web parts that are placed inside web part zones. The placement of the web part zones is specified by the template's page layout.

To modify the layout of the template, click the menu icon () in the green header of the active page template and select **Edit layout** in the menu.

![Editing a page layout](https://docs.kentico.com/docsassets/k82tutorial/modifying-page-templates/Editing_Page_Layout.png "Editing a page layout")

The page layout consists of basic HTML (or ASPX) code. It contains **CMSWebPartZone** controls, which define the web part zones on the template. Each zone control must have a unique ID. You can format the layout using any type of HTML code — it's up to you whether you use tables or a CSS‑based layout.

## Working with the layout code

You can use the selector above the code editor to quickly **Insert** web part zones and other advanced layout elements.

By clicking **Preview** in the header of the editing dialog, you can edit the layout code side-by-side with a preview of how the changes affect the live site version of the page.

> **Info:** **Access control**
>
> Only users who have the _Global administrator_ **Privilege level**  or have the **Design web site** permission assigned for the Design module can open pages on the **Design** tab and edit page layouts. This functionality cannot be accessed by regular content editors.
