CMS
Markdown based Content Management System in Elements
Server Requirements
The CMS Components in Elements require PHP 8.x or newer. You must ensure all CMS related pages use a .php extension.
Body
Collection
Wrapper, other CMS components should be placed inside of this.
Conditional
Field
Item
Item Author
Item Image
Item Tags
File and Folder Setup
The built-in CMS system in Element requires a specific file and folder setup to work. You must ensure all blog related pages use a .php extension.
Content
Content should be stored as Markdown down files inside a dedicated folder.
cms
posts
2025-04-18-my-first-post.md
2025-04-19-another-blog-post.md
The structure for the Markdown file:
Authors
You can create additional metadata about Authors by organizing a folder structure with supplementary markdown files. In this example, the authors folder is placed at the same level as the "posts" folder.
cms
posts
authors
steve.md
jasmin.md
The structure for the Authors Markdown file:
RSS Feed
Any page with a CMS collection can provide an RSS feed. Simply append ?format=rss
to the end of the URL, like this yourwebsite.com/blog/?format=rss
.
Advanced
A $post
array containing the post's information is available to any component placed inside a Collection or Item component.
author
array
<?=$post['author']?>
author.avatar
string | null
<?=$post['author']['avatar']?>
author.bio
string | null
<?=$post['author']['bio']?>
author.name
string
<?=$post['author']['name']?>
author.slug
string
<?=$post['author']['slug']?>
body
string
<?=$post['body']?>
date_published
string
<?=$post['date_published']?>
featured
boolean
<?=$post['featured']?>
feature_image
string
<?=$post['feature_image']?>
slug
string
<?=$post['slug']?>
status
string
<?=$post['status']?>
tags
array
<?=$post['tags']?>
title
string
<?=$post['title']?>
Last updated
Was this helpful?