Docs -> Creating a new Theme
Since FCMS 2.2, all themes must have at least an header.php, and footer.php template files, plus a CSS file named style.css.
While it is recommended the navigation.php template file is optional. The navigation information could be put inside the header template.
Themes can have more CSS files, templates or images, but the above files are the minimum requirements.
Below is an example of the directory structure for a typical theme.
themes/
The header.php is a global file that will be included on every page in FCMS. Any information like css or javascript that you would like to see on each page should be inserted here.
This file includes the basic html tags you would expect to see: the start of the html, body, and the #content tag, as well as the full title, meta, head tags.
The header is also where the #heading, which includes the logo and the "Welcome username | My Settings | Login/Logout" section.
And finally the page title is included in the header.
Here is an extremely stripped down version of a header file (please don't use this in your theme as it won't work).
(todo)
(todo)
FCMS 1.8.2 or earlier
How to Create a new Theme
Since FCMS 2.2, all themes must have at least an header.php, and footer.php template files, plus a CSS file named style.css.
While it is recommended the navigation.php template file is optional. The navigation information could be put inside the header template.
Themes can have more CSS files, templates or images, but the above files are the minimum requirements.
Below is an example of the directory structure for a typical theme.
themes/
alpha/
beta/
default/
smileys/
myNewTheme/
favicon.ico
login.css
beta/
default/
smileys/
myNewTheme/
images/
header.php
footer.php
navigation.php
style.css
datechooser.cssheader.php
footer.php
navigation.php
style.css
favicon.ico
login.css
Header Template (header.php)
The header.php is a global file that will be included on every page in FCMS. Any information like css or javascript that you would like to see on each page should be inserted here.
This file includes the basic html tags you would expect to see: the start of the html, body, and the #content tag, as well as the full title, meta, head tags.
The header is also where the #heading, which includes the logo and the "Welcome username | My Settings | Login/Logout" section.
And finally the page title is included in the header.
Here is an extremely stripped down version of a header file (please don't use this in your theme as it won't work).
<html>
<head>
<title><?php echo getSiteName(); ?></title>
</head>
<body id="top">
<div id="header">
<div id="logo">
<a href="<?php echo $TMPL['path']; ?>index.php">
<img src="<?php echo $TMPL['path']; ?>logo.jpg"/>
</a>
</div>
</div>
<?php
$TMPL['default-url'] = getDefaultNavUrl();
$TMPL['nav-link'] = getNavLinks();
include_once('navigation.php');
?>
<!-- ############ CONTENT START ############ -->
<div id="content">
<div id="pagetitle"><?php echo $TMPL['pagetitle']; ?></div>
<head>
<title><?php echo getSiteName(); ?></title>
</head>
<body id="top">
<div id="header">
<div id="logo">
<a href="<?php echo $TMPL['path']; ?>index.php">
<img src="<?php echo $TMPL['path']; ?>logo.jpg"/>
</a>
</div>
</div>
<?php
$TMPL['default-url'] = getDefaultNavUrl();
$TMPL['nav-link'] = getNavLinks();
include_once('navigation.php');
?>
<!-- ############ CONTENT START ############ -->
<div id="content">
<div id="pagetitle"><?php echo $TMPL['pagetitle']; ?></div>
Footer Template (footer.php)
(todo)
Navigation Template (navigation.php)
(todo)
Creating a new Theme for older versions.
FCMS 1.9 - 2.1FCMS 1.8.2 or earlier
