Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Views namespace #298

Open
Kaizodo opened this issue Aug 7, 2024 · 0 comments
Open

Views namespace #298

Kaizodo opened this issue Aug 7, 2024 · 0 comments

Comments

@Kaizodo
Copy link

Kaizodo commented Aug 7, 2024

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')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant