Customize the default page title

This is a community-contributed tutorial.
Mar 12, 2025

Open application/config/concrete.php. If you don't have a concrete.php file, you will need to create one. Paste the following code into concrete.php if it doesn't exist already. If concrete.php exists and already has arrays of configuration settings, add a comma after the last first level subarray (not the returned array) and then paste the seo part after the comma.

<?php

return [
    'seo' => [
        'title_format' => '%1$s :: %2$s',
        'title_segment_separator' => ' :: ',
    ]
];

This is a copy of the default configuration settings for formatting the page title. The site name replaces %1$s and any title segments (usually just the page name) replaces %2$s. If there are multiple title segments added with addTitleSegment(), they will be concatenated with the value of title_segment_separator beforehand.

The separator in title_format does not need to match the title_segment_separator even though they are the default values are the same.

Example: changing the title segment separator to a hyphen

return array(
    'seo' => array(
        'title_format' => '%1$s :: %2$s',
        'title_segment_separator' => ' - ',
    )
);

Example: changing the title segment separator and the separator in the title format to different values

return array(
    'seo' => array(
        'title_format' => '[%1$s]: %2$s',    // [site_name]: page name
        'title_segment_separator' => ' / ',  // [site_name]: page name / segment / segment
    )
);
Recent Tutorials
Customize the default page title
Mar 12, 2025

Change the default " :: " and/or "site name :: page title" formatting separator to something else.

Configure Composer to work with a Page Type
Feb 20, 2025
By myq.

Fix the "Unable to load block into composer. You must edit this content from within the context of the page." error message

Permissions for editors in a multilingual site
Feb 2, 2025
By myq.

How to set up a multilingual Concrete CMS site for groups of language-specific editors

Restoring deleted pages using advanced search
Jan 16, 2025
By myq.

How to recover deleted pages when there are more than a few to choose from.

How to Automate the Copyright Year
Dec 27, 2024

Learn how to keep your website's copyright year updated automatically in Concrete CMS.

How to change the path of a group of pages
Dec 23, 2024
By myq.

Change the canonical path without breaking things

Improvements?

Let us know by posting here.