Pages
/dashboard/settings/pages
Pages are extra content for your website, such as terms of service, privacy policy, contact, or any other page you want. A page can be an internal page hosted by your website, or a link to any URL.
Visible pages are listed in the About menu (question mark icon) at the top right of the website.
Lite/Pro feature
Pages are available in Chevereto Lite and Pro. If CHEVERETO_ENABLE_PAGES is set to 0, pages can't be managed and page URLs return 404. See Toggles.
Default pages
Chevereto comes with these pages:
| ID | Title | URL | Internal page type |
|---|---|---|---|
| 1 | Terms of service | /page/tos | Terms of service |
| 2 | Privacy | /page/privacy | Privacy |
| 3 | Contact | /page/contact | Contact |
Their content is example text. Edit the Source code of each page to add your own terms, privacy policy and contact details.
Adding pages
Click on Add at the top right, fill in the page values and submit.
The number of pages can be limited with the CHEVERETO_MAX_PAGES environment variable. The default 0 means no limit.
Editing pages
Click on a page title to edit its values. Changing the URL key changes the page URL, so links to the old URL will stop working.
Deleting pages
Click on Delete next to the page. This can't be undone.
Page values
Title
The page title, used for the page link in menus and for the page <title> tag.
| Type | Accepted |
|---|---|
| String | Required, maxlength 255 |
Page status
Toggles if the page is active or not.
| Value | Effect |
|---|---|
| Active page | The page can be accessed and linked |
| Inactive page | The page returns 404 and it is removed from menus |
Type
Determines the page type.
| Value | Effect |
|---|---|
| Internal | A page hosted by your website, at /page/<url_key> |
| Link | A menu link to the Link URL, no page gets created |
Internal page type
- Applies only if
Typeis set toInternal.
Determines the purpose of the internal page.
| Value | Effect |
|---|---|
| Extra page | A general purpose page (default) |
| Terms of service | The page linked as terms in the system |
| Privacy | The page linked as privacy policy in the system |
| Contact | The contact page |
You can have many extra pages, but only one page for each of the other types. Types already used by another page aren't listed.
The Terms of service and Privacy pages are linked in the "I agree to the terms and privacy policy" checkbox shown on signup, uploads and the contact form. The terms page is also linked in the Powered by Chevereto footer.
Keep them visible
These links only work while the page is active and its Page visibility is set to visible. If you hide or deactivate the terms or privacy page, the agreement links lead nowhere.
Page visibility
- Applies only if
Typeis set toInternal.
Toggles if the page link is shown in the About menu.
| Value | Effect |
|---|---|
| Visible page | The page is listed in the About menu |
| Hidden page | The page isn't listed, but anyone with the link can access |
An inactive page is always hidden. Link pages are visible whenever they are active.
URL key
- Applies only if
Typeis set toInternal.
The URL key (path) for the page, as in /page/<url_key>. It can contain forward slashes to make nested paths, such as help/faq for /page/help/faq.
| Type | Accepted |
|---|---|
| String | Required, maxlength 32, letters, numbers, hyphens, underscores and forward slash |
URL keys must be unique. Keep the privacy URL key for the privacy page, as the Cookie compliance notice links to /page/privacy.
File path
- Applies only if
Typeis set toInternal. - Shown only when PHP pages are enabled.
The file where the page source code is saved, relative to content/pages/. Use a .php or .html extension, for example help/faq.php.
| Type | Accepted |
|---|---|
| String | Required, a unique .php or .html path |
Changing the file path moves the page source code to the new file and deletes the old file.
Meta keywords
- Applies only if
Typeis set toInternal.
The page <meta name="keywords"> tag value.
| Type | Accepted |
|---|---|
| String | Optional, any |
Meta description
- Applies only if
Typeis set toInternal.
The page <meta name="description"> tag value, used by search engines and in link previews.
| Type | Accepted |
|---|---|
| String | Optional, any |
Source code
- Applies only if
Typeis set toInternal.
The page content, as HTML. It is displayed inside your website layout, between the website header and footer.
The source code is saved in the database. If you enable PHP pages, it is saved to the File path file instead.
Link URL
- Applies only if
Typeis set toLink.
The URL the menu link points to.
| Type | Accepted |
|---|---|
| String | Required, a http or https URL |
Link target attribute
The HTML target attribute for the page link.
| Value | Effect |
|---|---|
_self | Opens in the same window (default) |
_blank | Opens in a new window or tab |
Link rel attribute
The HTML rel attribute for the page link, for example nofollow noopener.
| Type | Accepted |
|---|---|
| String | Optional, letters, numbers, hyphens, underscores and space |
Link icon
The icon shown next to the page link in the About menu, as Font Awesome classes, for example fas fa-landmark.
| Type | Accepted |
|---|---|
| String | Optional, letters, numbers, hyphens, underscores and space |
Sort order display
The position of the page link in the About menu and in the pages listing. Use 1 for the top position. Pages without a value are listed first.
| Type | Accepted |
|---|---|
| Integer | Optional, min 1 |
PHP pages
By default, page source code is HTML saved in the database. Set the CHEVERETO_ENABLE_PHP_PAGES environment variable to 1 to save internal pages as files in the content/pages/ folder, where .php files are run as PHP code.
With PHP pages enabled:
- The File path field is shown to set the page file.
- The Source code is written to that file. If the folder isn't writable by PHP, edit the file with an external editor.
- Deleting a page deletes its file.
- The default contact page includes a contact form, with CAPTCHA support, that sends messages to the Incoming email address.
PHP code
PHP pages run any code with the same access as Chevereto itself. Only enable them if you trust every admin that can edit pages.
