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

Prefix or path for partials? #113

Open
andreasheim opened this issue Oct 27, 2014 · 2 comments
Open

Prefix or path for partials? #113

andreasheim opened this issue Oct 27, 2014 · 2 comments

Comments

@andreasheim
Copy link

Is there a way to provide a common prefix for partials so that they can be used without a folder name?

E.g. partialsPath = 'templates/partials' or partialsDefaultPath

And then the partials can be used like

{{> partial-file-name}}

instead of

{{> partials/_partial-file-name}}

Obviously I could just put global partials in the templates folder, but that feels dirty.

(strip the underscore as well, but I could live with still needing it).

Apologies if I missed something obvious.

@AlexRiedler
Copy link
Collaborator

@andreasheim you could do this in your own personal javascript; I am now wondering what I could support for this case though as well...

Getting proper name stripping is actually a pretty hard thing to do, might need to add another configuration option for something like this.

@andreasheim
Copy link
Author

I don't know how other tools implement it. I think they may rather just have you specify different folders for normal templates and partials. Not sure how that would integrate with the sprockets asset pipeline though.

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