e107_img_.jpg
theme.php
Írta: fizi, 2016. dec. 07.

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;
}
 
?></header>

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:

// Auto generated title, script, meta and link tags are added here.

MY HEADER

Caption of the current page

Text of the current page
My Footer

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)

Hozzászólás