-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
feat/fix: allow replacing of blade template namespaces #3167
Conversation
I'll want to see tests before reviewing, sorry. Also, do ALL files in a namespace get replaced? That could be a lot of code duplication. |
You can still replace that view using the Now that probably doesn't/can't be applied to other views such as errors, but I reckon there's probably a better way to go about replacing a specific view than replacing a whole namespace? especially if
|
We'll want to support both |
Allows `replaceNamespace()` extender to actually remove old routes.
[ci skip] [skip ci]
We only really need prepend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, a few more requests:
Can we add a test case showing that you can override a view used by flarum, such as the homepage, in a full integration test?
Maybe we should rename prepend
on the extender to override
or extendNamespace
?
Out of those options, I prefer |
Changes proposed in this pull request:
@imorland deserves the credit for this, but I'll happily take it (unless it doesn't work, then blame him!).
This is, for example, needed for overriding the
forum.blade.php
file to inject custom HTML where needed, and not only where theheaderHtml
andfooterHtml
is included.This PR will need tests! I'll try my best... 🙃
Reviewers should focus on:
Is this a feature or a bug fix? Replacing blade views used to be possible during beta, but I believe when the shift was made to extenders, this functionality was lost.
Necessity
Confirmed
composer test
).Required changes: