-
Notifications
You must be signed in to change notification settings - Fork 170
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
Nested component paths #603
Labels
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey,
I've been trying out Fractal on a Nunjucks project I'm currently working on and am really impressed with it.
One issue I've encountered is with nested component paths.
By default, it seems I can only include/extend components with the @handle syntax or via the filename (if I first specify a path when configuring the Nunjucks instance).
What I'd like to be able to do is include a component with its full path, e.g.
{% include "path/to/files/component.njk" %}
as this is how they are included in my project.
The only way I can see to achieve this is to add another custom loader into the Nunjucks adapter, along the lines of:
This takes the filename from the path string and converts it to a handle so it can be passed to the getView method.
It seems to work ok, but was wondering if there was a better way.
Thanks
The text was updated successfully, but these errors were encountered: