Alternative php include for handlebars.js in the construction of templates

3

I'm making a new website, I'm with the template ready and I want to implement handlebars.js,

To control the template I have always used:

<php include "header.php"; ?>
<php include "footer.php"; ?>

and so on.

I want to improve the level of my projects using handlebars.js but I do not know how to control the template with good practices. I believe creating one:

<script id="header" type="text/x-handlebars-template"></script>

And putting my whole header in there with all tags and css calls would not be a good practice. What would be the best switch for includes?

    
asked by anonymous 22.09.2014 / 04:06

1 answer

1

I'm still waiting for more ideas but the best solution I found for now was to use Ember.js and its template structure. link

Making a template with all the header, footer and etc, giving include in the body. I'm finding a good alternative for now! Only problem is keeping all templates in the same html file.

    
22.09.2014 / 23:32