Static Pages
Creating and managing static content pages in apidcms.
📄 Static Pages (type page)
The simplest type. One page = one record in the pages table.
How to Create
- Admin Panel → Tables → pages → Add record
- Fill in:
title— headingslug— address (about,contacts)content— text (HTML)status—active
- In navigation create a record:
url=about(matches the slug)page_type=page
- Done. The page is accessible at
/about.
Template
Default: page.html.twig
You can specify your own via template in navigation:
template = "my-custom"
→ CMS looks for my-custom.html.twig
Template Variables
| Variable | Contains |
|---|---|
page.title |
Heading |
page.content |
HTML content |
page.meta_title |
Meta title |
page.meta_description |
Meta description |
title |
= page.title |
Template Example
{% extends 'base.html.twig' %}
{% block title %}{{ page.meta_title ?? page.title }}{% endblock %}
{% block content %}
<article>
<h1>{{ page.title }}</h1>
{{ page.content|raw }}
</article>
{% endblock %}
pages Table Fields
| Field | Type | Description |
|---|---|---|
title |
TEXT | Heading |
slug |
TEXT UNIQUE | Address |
content |
TEXT | HTML content |
meta_title |
TEXT | SEO title |
meta_description |
TEXT | SEO description |
status |
TEXT | active / draft |
created_at |
DATETIME | — |
updated_at |
DATETIME | — |