Templates & Styles

The used Template Engine of flatCore is Smarty - Dokumentation.

Folder and File structure

All Themes are located in the directory /styles/ in the Root of flatCore.

  • theme-folder
    • css (Directory for your CSS files)
    • images (Directory for your images)
      • preview.png (Preview of the Theme)
    • js (Directory for JavaScript files)
    • php (Directory for PHP Scripts)
      • definitions.php
      • index.php
      • options.php
    • templates (Directory for .tpl Files - see list below)
    • info.xml (File with Theme informations)
    • readme.html (Readme-File for your Theme)

The file /themes/xyz/definitions.php

Overwrite Variables from the Original-Source /core/definitions.php.

The file /themes/xyz/index.php

This file extends the basic Text Parser. You can inject your Code by the function theme_text_parser()

 * example
 * return the whole page in uppercase
function theme_text_parser($str) {

    $str = strtoupper($str);

    return $str;

The file /themes/xyz/options.php

This file has an impact on both the frontend and the backend.

The .tpl files

Some templates may be addressed directly by flatCore. These templates must therefore located in the directory styles/yourTempate/templates/.

List of required Template Files:

  • index.tpl ... The first template which is loaded. From here you can link to all your other template files.
  • layout_default.tpl ... This Template should contain the default Layout of your Theme.
  • 404.tpl ... Displayed when an HTTP status code 404 (Page not found)
  • registerform.tpl ... The form new users can sign up
  • profile_main.tpl ... The Profile page.
  • status_message.tpl ... The system messages are displayed here.
  • statusbox.tpl ... Here are the links to the Backend (for Administrators) or the profile page.
  • loginbox.tpl ... Displays the registration form (can be disabled in the preferences).
  • searchresults.tpl ... Displays the search results.
  • password.tpl ... The form to reset the password.

Note: All Template files which named like layout_*.tpl, can be assigned to each Page.

Roadmap Release Notes

The development of flatCore CMS is very time consuming and requires a lot of resources. Nevertheless, flatCore.org should remain ad-free. You are welcome to support this project with a donation.

GitHub Stargazers