Protocols needed for C5.8 install
Permalink
I am still trying to wrap my head around installation for 5.7+
Please clarify:
1. Must have default.php, view.php, page_theme.php, thumbnail.png and description.txt
2. Must have elements/header.php and elements/footer.php (The default Elemental theme has an extra header_top and footer_bottom - is this necessary for c5.7+?)
3. Must have empty MySQL database
4. Must have <?php defined('C5_EXECUTE') or die("Access Denied.");?> at the top of all files
5. Must append all hrefs and src with <?= $view->getThemePath() ?>
6. <?php Loader::element('header_required') ?> goes at the top of the header.php
7. <?php Loader::element('footer_required') ?> goes at the bottom of the footer.php
8. Must add <div class="<?= $c->getPageWrapperClass() ?>"> to allow sliding interface
9. Install and activate theme
Sorry for being so dim but be good to get it in my brain...
Please clarify:
1. Must have default.php, view.php, page_theme.php, thumbnail.png and description.txt
2. Must have elements/header.php and elements/footer.php (The default Elemental theme has an extra header_top and footer_bottom - is this necessary for c5.7+?)
3. Must have empty MySQL database
4. Must have <?php defined('C5_EXECUTE') or die("Access Denied.");?> at the top of all files
5. Must append all hrefs and src with <?= $view->getThemePath() ?>
6. <?php Loader::element('header_required') ?> goes at the top of the header.php
7. <?php Loader::element('footer_required') ?> goes at the bottom of the footer.php
8. Must add <div class="<?= $c->getPageWrapperClass() ?>"> to allow sliding interface
9. Install and activate theme
Sorry for being so dim but be good to get it in my brain...
1. Yep.
2. Only really need one of each, some people use more.
3. Yep.
4. Yep.
5. Usually, however for customising in header use: <?php echo $html->css($view->getStylesheet(‘theme.less'))?>
6 & 7. ‘Loader::element’ is now ‘View::element’ and placement can vary depending on your theme code. My ‘header_required’ sits directly above the closing ‘head’ tag and ‘footer_required’ above the closing body or any additional scripts I might use.
8. Yep.
2. Only really need one of each, some people use more.
3. Yep.
4. Yep.
5. Usually, however for customising in header use: <?php echo $html->css($view->getStylesheet(‘theme.less'))?>
6 & 7. ‘Loader::element’ is now ‘View::element’ and placement can vary depending on your theme code. My ‘header_required’ sits directly above the closing ‘head’ tag and ‘footer_required’ above the closing body or any additional scripts I might use.
8. Yep.
1. I don't think the thumbnail and the description.txt files are required; if your page_theme.php has the getThemeName and getThemeDescription function this will overwrite the content in description.txt anyway
2. This depends on how you want to structure your theme, having header and footer as separate files make sense so you don't have to repeat the code in all your templates
5. $this->getThemePath() outputs the path to your theme folder, so you need to use that when you want to include a resource that is located in your theme directory; if you want to link to a page (internal or external) you don't use it