How to copy the Elemental theme to use as a base for new themes

This is a community-contributed tutorial. This tutorial is over a year old and may not apply to your version of Concrete CMS.
Apr 3, 2015

Here are the steps required to copy the Elemental theme to create a new theme called Test.

1. copy the elemental folder from the core themes directory into the application directory

copy from:
concrete\themes\

copy to:
application\themes\

2. rename the "elemental" folder to "test"

the theme folder name:
- must be lowercase
- cannot use spaces
- cannot use hyphens
- underscores can be used to separate words
Example:
my_theme

3. go to the Pages & Themes area in the dashboard

4. first error:

An unexpected error occurred. 
Cannot redeclare class Concrete\Theme\Elemental\PageTheme

5. first error fix: in page_theme.php

find:

namespace Concrete\Theme\Elemental;

change to:

namespace Application\Theme\Test;

when using folder names with underscores
- the underscore must be removed and replaced with CamelCase formatting
Example:
folder name: my_theme

namespace Application\Theme\MyTheme;

6. in your Test theme directory
version 5.7.4.2 or earlier
- open description.txt
- change "Elemental" to "Test"

if the folder was named my_theme
- change "Elemental" to "My Theme"

version 5.7.5 or later
- open page_theme.php
- look for getThemeName()

public function getThemeName()
{
    return t('Elemental');
}

change "Elemental" to "Test"

public function getThemeName()
{
    return t('Test');
}

7. install the Test theme

8. activate the Test theme

9. return to website

10. second error:

An unexpected error occurred.
File `../../../css/build/core/include/mixins.less` not found. in main.less

11. second error fix: in main.less (application\themes\test\css\main.less)

find:

@import "../../../css/build/core/include/mixins.less";

change to:

@import "../../../../concrete/css/build/core/include/mixins.less";

12. return to website

13. the site works and is now using a copy of Elemental called Test

Recent Tutorials
Create custom Site Health tasks
Apr 19, 2024
By myq.

This tutorial will guide you through the creation of a new Site Health task

Reusing the same Express entity in multiple associations
Apr 11, 2024
By myq.

How to create and manage multiple associations in Express

Express Form Styling
Apr 11, 2024
By myq.

Different ways to style Express forms

Setting addon/theme version compatibility in the marketplace
Jan 9, 2024

For developers worn out with setting the latest addon or theme version manually across too many core versions, here is a JavaScript bookmarklet to do it for you.

How to get the locale of a page
Jan 8, 2024
By wtfdesign.

Now, why don't we just have a getLocale() method on Page objects beats me, but here's how you work around it

Using a Redis Server
Jun 16, 2023
By mlocati.

How to configure Concrete to use one or more Redis servers to persist the cache.

Improvements?

Let us know by posting here.