Theme Basics Creating an e107 theme

theme.php

Contains the main HTML template for your theme. A very basic theme.php file might look like this example below. the {---} is replaced automatically with the main page's content.
<?php

$LAYOUT['default'] = "
        <header>MY HEADER<header>
        <article>
            {---}
        </article>
    <footer> My Footer </footer>
";

function tablestyle($caption, $text, $mode='') 
{
    echo "<h3>".$caption."</h3>";
    echo $text;
}

?>
e107 will take this data and render the dynamic content of the page into it. The output of the above might look something like this:
<html>
<head>
 // Auto generated title, script, meta and link tags are added here. 
</head>
<body>
    <header>MY HEADER<header><article>
    <h3>Caption of the current page</h3>
    Text of the current page
    </article><footer> My Footer </footer>
</body>
</html>

Including JS, CSS and Meta in the head

See the section on including Javscripts, Stylesheets and Meta information.

Including a language file

You should use core language terms and avoid using a theme language file if possible. Refer to e107_languages/English/English.php for available terms.
e107::lan('theme'); // loads e107_themes/CURRENT_THEME/languages/English.php (when English is selected)

Friday 14 June 2013 - 00:00:00