Skip to content

How to write templates

Kiril Kirkov edited this page Dec 22, 2021 · 3 revisions
  1. Each template in /application/views/templates/ directory should contain follow file structure: alt text

  2. Each file name is for the page which will show.

  3. Page urls are

  • / - for home page (home.php)
  • /checkout - checkout page (checkout.php)
  • /shopping-cart - shopping cart page (shopping_cart.php)
  • /contacts - contacts page (contacts.php)
  • /page/pageName - every textual page added from administration (dynPage.php)
  • /blog - blog (blog.php)
  • /blog/myarticle_1 - blog articles preview (view_blog_post.php)
  • /myProduct_1 - online store product preview (view_product.php)
  1. _parts/footer.php and _parts/header.php are loaded in every of this pages
  2. Url for load cssfile.css from your css folder is base_url('templatecss/nameOfFile.css')
  3. Url for load jsfile.js from your js folder is base_url('templatejs/nameOfFile.js')
  4. Comming variables from controllers to views you can see in each conroller (names of controllers are equal to views)
Clone this wiki locally