-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Ability to override Component partials (Cherry pick method II) #44
Comments
This has been implemented in the latest build |
Quick doubt. This would work with the default.htm partial as well? i don't seem to be getting to override the blog plugin, posts component default.htm with that approach |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current solution (#41) is a bit flakey. After some careful consideration, the following approach should be used instead.
Components referencing partials
Components can reference their partials in two ways. First is an explicit method:
The second is a relaxed method:
The relaxed method is contextual:
Overriding component partials
All component partials can be overridden using the theme partials. Following from the previous example, if our component called channel uses the title.htm partial.
We can override the partial by creating a file in our theme called partials/channel/title.htm.
The file path is broken down like this:
We can choose our own name for the partial subdirectory by giving the component a different alias. For example:
Now we can override the partial by creating a file in our theme called partials/foobar/title.htm.
The text was updated successfully, but these errors were encountered: