Designing pages
Post templates and components
Design the post page and the category page once for every post, and build a header and footer you edit in one place for every page
On this page
Content on the site is shown with three things, all designed in the same designer:
| Kind | What it is | Menu |
|---|---|---|
| Page | One page per address, e.g. home or about us, designed freely | Pages |
| Template | The shared look of the post page or the category page; text is placeholders such as {{post.title}} | Post templates |
| Component | A piece used on many pages, such as the site header and footer | Components |
Post templates#
Use one when you want to change the look of every post page at once; a post itself only holds its content.
- Go to Post templates → New template and press Design
- Place a Post content element (Assets → Data that updates itself) where the content should appear
- Put the post's data into text or images with Insert data, such as the title, intro, date, author, category or cover image
- Save, go back to the template list and press Use for post pages (or Use for category pages for
/category/…)
Data often used in templates:
| Binding | Value |
|---|---|
{{post.title}} | Post title |
{{post.excerpt}} | Excerpt / intro |
{{post.date}} | Date (in the date format of Site settings → General) |
{{post.author}} | Author |
{{post.category}} · {{post.categoryUrl}} | Category and its link |
{{post.url}} · {{post.image}} | Post link · cover image |
{{site.title}} · {{site.tagline}} · {{site.logo}} | Site details |
You can also pick the templates in Site settings → Display (post page look / category page look). Without one, a basic look is used. Content types declared in code (site.postType) choose their own template under "Content types from code" on the same tab.
In the post editor, Edit the look of every post takes you to the template in use. The Breadcrumb element (Home › Category › Title) adds a navigation trail to a template.
Components#
Edit once and every page that uses the component changes.
- From the designer — select layers and press Ctrl+Alt+K (Create component). It appears under Assets → Components, ready to drag onto other pages
- From the list — Components → New component
- Edit the main component — press Edit main component on the Assets tab, or Design in the list, then save: every page using it changes (components keep 25 versions too)
- Detach — to stop one placement from following the main component, use Detach from component
After deleting a component, pages that used it no longer show it (the pages themselves are fine) — check before you delete.
The menu in the header#
The Navigation menu element shows the links of a menu set up under Menus in the admin; choose which menu on the Content tab. See Posts, categories and menus.
