You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to migrate a large project to assemble. I have two partials named header.hbs, placed in different directories like this:
../partials/foo/header.hbs
../partials/bar/header.hbs
I've tried {{> foo/header }} and {{> 'foo/header' }} but those fail with Warning: The partial foo/header could not be found.
I can see in the verbose output that two partials with name header are created. {{> header }} succeeds, but will always return the second file (probably since it was the last one registered).
How can I reference a specific header partial?
The text was updated successfully, but these errors were encountered:
grunt-assemble will only use the basename of the partial's filepath.
There is a registerPartial option that can be a function that gets the engine (handlebars), filename, and content properties.
This won't really help you here because filename will always be header.
Since we moved the original assemble code into this library, I think we'll consider any PRs that can make this easier and we can use proper semver versioning. Eventually, we'll be using more of the new features in assemble (like renameKey) which takes the entire filepath and allows updating how the key is created.
I'm trying to migrate a large project to assemble. I have two partials named header.hbs, placed in different directories like this:
../partials/foo/header.hbs
../partials/bar/header.hbs
I've tried
{{> foo/header }}
and{{> 'foo/header' }}
but those fail withWarning: The partial foo/header could not be found
.I can see in the verbose output that two partials with name
header
are created.{{> header }}
succeeds, but will always return the second file (probably since it was the last one registered).How can I reference a specific header partial?
The text was updated successfully, but these errors were encountered: