LogoLogo
  • Introduction
  • Early Access
  • System Requirements
  • Elements FAQ
  • Purchasing FAQ
  • Licensing FAQ
    • License Types
  • Why Elements?
    • Static Website Benefits
    • Build a Digital Garden
  • Community Forum
  • Marketplace
  • Elements App
    • Getting Started
    • Keyboard Shortcuts
    • Design System
    • Editor
      • Apple Intelligence
      • Component Inspector
      • Dark Mode
      • Node Browser
      • Page Manager
      • Preview
      • Resources
      • Responsive Breakpoints
      • Workspaces
    • Components
      • Built-in Components
        • Accordion
        • Background
        • CMS
          • CMS Online Editor
        • Button
        • Container
        • Divider
        • Dropdown
        • Flex
        • Filter
        • Filter Tags
        • Form
        • Gallery
        • Grid
        • Image
        • Menu
        • Modal
        • Modal Close
        • Reveal
        • Image Slider
        • SVG
        • Text
        • Top Pages
        • Typography
        • Video
      • Common Controls
        • Link
        • Layout
        • Sizing
        • Spacing
        • Transitions
        • Effects
        • Filters
        • Transforms
        • Borders
        • Advanced
      • Custom Components
    • Templates
      • Global Templates
    • Site Settings
      • Template
      • Publishing
    • Theme Studio
      • Theme
      • Colors
      • Screens
      • Font Family
      • Font Size
      • Spacing
      • Shadows
      • Border Width
      • Border Radius
      • Typography
    • How to
      • Add an Icon Inside a Button
      • Adjust Smooth Scroll Speed
      • Apply Anchor Scroll Padding
      • Add Snow to your Website
      • Build a Sticky Menu
      • Center Align Components
      • Create a Card
      • Site Banner with Text
      • Make a two column layout
    • Resources
    • Troubleshooting
    • SEO
    • Robots.txt
    • Advanced
      • URL Scheme
  • Elements Language
    • Introduction
      • Getting Started
      • Component Styling
    • Element Pack
      • info.json
      • Components
        • info.json
        • Icons
        • Properties.json
          • Grouping Controls
          • Default Values
          • General Structure
            • Title
            • ID
            • Format
            • Visible
            • Enabled
            • Responsive
          • UI Controls
            • Divider
            • Heading
            • Image
            • Information
            • Link
            • Number
            • Resource
            • Segmented
            • Select
            • Slider
            • Switch
            • Text
            • Text Area
            • Theme Border Width
            • Theme Border Radius
            • Theme Color
            • Theme Font
            • Theme Spacing
            • Theme Shadow
            • Theme Text Style
            • Theme Typography
        • Templates
          • Portal
          • Backend
          • Conditional Statements
          • Regular Expressions
          • Looping
          • Includes
          • Image Resources
          • HTML
            • Anchor
            • Raw
            • Editable Content
            • Dropzones
            • Inline templates
          • CSS
          • JavaScript
        • Assets
        • Hooks.js
          • Common use cases
          • Passing data to templates
          • Working with Collections
          • Working with UI Controls
          • Working with Resources
          • Available Functions
            • rw.addAnchor
            • rw.getBreakpoints
            • rw.getBreakpointNames
            • rw.getResponsiveValues
            • rw.resizeResource
            • rw.setProps
            • rw.setRootElement
          • Available Data
            • rw.collections
            • rw.component
            • rw.node
            • rw.pages
            • rw.project
            • rw.props
      • Collections
        • Data collections in Hooks.js
        • Accessing Data in Templates
        • Collections in properties.json
      • Shared Files
        • Assets
        • Templates
      • Themes
    • Troubleshooting
  • Elements Cloud
    • Getting Started
    • Troubleshooting
  • Elements Store
    • Getting Started
    • Add-on Guidelines
  • Branding
    • Logotype
    • Logotype Animated
    • Icon
  • Legal
    • Subscription Terms of Service
    • Cloud Terms of Service
    • Frameworks
Powered by GitBook

We are Realmac Software. We make nice things.

On this page
  • Server Requirements
  • File and Folder Setup
  • Content
  • Authors
  • RSS Feed
  • Advanced

Was this helpful?

Edit on GitHub
Export as PDF
  1. Elements App
  2. Components
  3. Built-in Components

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.

Blog Components
Description

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:

---
title: "An Example Post"
date_published: "2025-04-20"
author: Steve
tags: [technology]
status: published
feature_image: blog/myimage.jpg
featured: true
---
This is the contents of my first post.

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:

---
name: "Steve"
avatar: blog/steve-photo.png
---
This is all about Steve.

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.

Name
Type
Example

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']?>

PreviousBackgroundNextCMS Online Editor

Last updated 9 hours ago

Was this helpful?