Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
[TEMPLATE] - How explode the template ?
  • Hello, I want create my template for my website.
    I would like explode the template.php file in differents files (header.php, menu.php, content.php and footer.php) I put my files in the directory /views, so :
    /views/template.php
    /views/header.php
    /views/menu.php
    /views/content.php
    /views/footer.php
    

    Now, I want include my files in template.php.
    How do I do ? Thanks djik
  • Hi djik, I suggest you to use the "set_partial" method of the Theme class, theming is very well documented and created in Fuel >=1.2.1: http://docs.fuelphp.com/classes/theme/introduction.html Let me know if you need some code.
  • ** Moved to General ** Please do not ask questions in a forum dedicated to tips and tutorials.
  • For simple templates you don't need the Theme class, you can do that with Views and Controller_Template as well. How is very well documented, so I suggest you start by reading instead of asking (hint: see http://docs.fuelphp.com/general/views.html, nested views).

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion