This article seems to suggest that there such things as include
templates. I've made the obvious Google searches but didn't find any documentation.
What are they?
From the Express guide:
The Express view system has built-in support for partials and collections, which are “mini” views representing a document fragment. For example rather than iterating in a view to display comments, we could use partial collection.
So when you have the same "view" for a user in multiple pages, it's more useful to have that view stored in a file and "include" it everywhere. (DRY - Don't Repeat Yourself)
Another example is when have the same layout everywhere and you want to include the rest of the page (for example you could include different headers, footers and body depending on the page).
Here's a good example with Jade, provided in the Express samples:
https://github.com/visionmedia/express/tree/master/examples/jade/views
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With