Menu icon Foundation
Use interchange partials instead of using php

Can interchange be used to bring in html partials...header.html, sidebar.html and footer.html into pages similar to what php does with html? I have a large existing website that needs to be responsive and would prefer not to use php (boss has security concerns). If this is possible, how would the index page layout be structured using interchange and has anybody had any luck with using interchange in this manner?

interchangePHPPartials

Can interchange be used to bring in html partials...header.html, sidebar.html and footer.html into pages similar to what php does with html? I have a large existing website that needs to be responsive and would prefer not to use php (boss has security concerns). If this is possible, how would the index page layout be structured using interchange and has anybody had any luck with using interchange in this manner?

This post has been closed. No new replies can be added.

Hans McMurdy almost 5 years ago

Interchange is meant for images so the sort answer, no unless you rewrite it with a bunch of ajax requests and to the point where it isn't interchange.

If your just looking into using html partials I would recommend assemble.io and this yeoman generator:https://github.com/doingweb/generator-sassy-roboyeti
It will make it easy to compile html files (header.hbs, sidebar.hbs, footer.hbs, etc...)

Or if your interested in a static blog generator I could recommend one (though it is still experimental).

Hans McMurdy almost 5 years ago

I meant to correct myself earlier. Actually I was wrong, interchange CAN now (they updated the docs) import html files. Check it the docs if you haven't already and if you have any problems let me know and i'll try and set up a repro.

James Stone almost 5 years ago

Keep in mind if you put JavaScript ZURB Foundation Components in those partials, they may not work correctly. Sass / CSS components should be no problem.