I've followed this tutorial by Zack Spear. It leaves your website with a header and footer that stay constant while the body of the page is loaded in through AJAX when you change pages.

Is it possible to have different _layout templates used for different pages with this approach or can it only be one? Could I hide the header on certain URLs? Could I show a secondary menu on specific urls?

1 Answer 1


Although you couldn't necessarily change the _layout template with the method given in that tutorial. What you could do is include the header the templates rather than in the _layout.html for each template and change it out with another header in the other specific URLs. Or hide it, or whatever you like.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.