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

Support subfolders in layouts the same way they are supported in partials #152

Open
lipis opened this issue Jan 29, 2018 · 4 comments
Open
Milestone

Comments

@lipis
Copy link

lipis commented Jan 29, 2018

for v2.0

@gakimball gakimball added this to the v2.0 milestone Jan 31, 2018
@lipis
Copy link
Author

lipis commented Feb 6, 2018

@gakimball Any chance we can get that any time soon? (in the v2 branch?)

@gakimball
Copy link
Contributor

gakimball commented Feb 6, 2018

I can probably get to it in the next few days. With the spare time I have I've been working on #143, which refactors how all the template/partial/helper loading works.

If you'd like to implement it before then, I'd take a PR.

@lipis
Copy link
Author

lipis commented Feb 6, 2018

Thanks @gakimball no much spare time these days.. can you point out the similar PR for the partials.. just to get an idea?

@gakimball
Copy link
Contributor

Here's where it happens for partials: https://github.com/zurb/panini/blob/8d5a66701f299c5040b41e24165324f02ed94c11/engines/handlebars.js#L49

You can see that the name is a calculated path based on the project root. Whereas, if you go up a few lines, where layouts are created, it just takes the basename, which means it's always just the name of the folder. Basically you're gonna copy the path calculation code from partials over to layouts.

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

2 participants