Pages
Last updated: Feb 06, 2024

Introduction

Pages are the very heart of your website. On pages you can place your content which is visible for your website visitors.

Pages are placed within categories, and pages can have one or more sections in which the HTML content of your pages is placed.

There is not much you can setup on a page, since it's only a collection of sections.

Page URL

Setting the page URL is important as it represents the actual URL in the address bar of the browser.

You can leave it empty, so it will just use the URL of the category the page is in (you can only have 1 page with an empty URL in a category). But you can also specify a unique URL for this page. Be aware you can only use characters which are allowed in URL's.

You can also specify variables in the URL, this can be usefull if you have some specific custom logic on a page which is dependant of URL segments.
Here's an example on how you can use variables: 
URL: news/{id}
This will match anything like 'news/12', or 'news/article4'. But NOT 'news/12/segment'.

On the page you can use the URL segments helper to retrieve the values in the segments..

Sections

On a page you can add one or more sections. Sections contain the HTML code for your page. A section can be used on multiple pages to minimize duplicate code, or even multiple times on the same page, if you want.

You can have for example a section to show header content of your page. And perhaps 2 or 3 content sections. 

To add a section, you click 'Add section' when on a page. Then a list of all sections will be shown. You can also give the section a name which is specific for this section on this page. When the sectuib is added, you can minimize is if you don't want to work on this specific sectuib. If you minimize it, it will only be minimized for you. Click the cog icon to rename the section or to change the position of that section.

Collaborate

When working on a page, you don't want other users to accidentaly overwrite your changes.

In order to prevent this, a section will be locked as soon as you start changing the content of a section. When another user enters this page, they will see that you are working on this section and that they can't change it untill you have saved your changes.

Autosave

All changes are auto-saved after each change, so you won't loose any content when you accidentally exit the page.

The changes are auto-saved, but not auto-published, the website visitors won't see your changes untill you save the page. But when you return to the page in the CMS, you will see that your changes were auto-saved.

Press save or ctrl+s to save the page.

Global variables

There are some variables which are available across all pages. Here's a list of these variables:

Name Type Example
$webigniter->getUpdatedAt('FORMAT')
Date (date formats) $webigniter->getUpdatedAt('Y-m-d') outputs 2023-12-31
$webigniter->getCreatedAt('FORMAT') Date (date formats) $webigniter->getCreatedAt('Y-m-d') outputs 2023-12-31
1