Views namespace
Opened this issue · 0 comments
Kaizodo commented
I would be great to have a feature like namespace for views for example
eta.setNamespace('project1',path.join(root_dir,'project1'));
eta.setNamespace('project2',path.join(root_dir,'project2'));
eta.render('@project1/somepage',{});
eta.render('@project2/somepage',{});
this is very usefull feature for shorter include paths, with name spaces we can set proper paths outside of template and within template we can use namespaces so we don't have to do ../includes/header
, ../../../../components/includes/header
we can simply use
eta.render('@includes/header')