K
K
Klein Maximus2014-08-12 23:04:37
Node.js
Klein Maximus, 2014-08-12 23:04:37

What template engine for Express (node.js) has template loading from a list of directories?

Most template engines I've looked at allow you to load (and expand, which is the most offensive) templates from a specific directory. Are there any engines that allow you to search for templates not in water, but in several directories?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DreamMinder, 2014-08-13
@DreaMinder

as far as I know, the template file search system is tied to the express itself. Whichever templating system you choose, only one folder configured in Express will be loaded.
Solutions:
1) use subfolders
2) use multiple express objects: one for each section requiring its own templates folder (as suggested by the creator, TJ, look for his video about it on vimeo)
3) a working code for searching a template by array was posted on stackoverflow folders.
which one works - I don't remember, try stackoverflow.com/questions/11315351/multiple-view...

K
Klein Maximus, 2014-08-13
@kleinmaximus

You won't be able to use subfolders if it is envisaged that the templates may not belong to the application, but to a separate module.
Thank you very much for the link!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question