-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support meta_title overrides from page model #58
base: main
Are you sure you want to change the base?
Conversation
@srijan Thanks for your contribution, I had this situation as well and have been looking for a better solution for quite some time. Your solution solves the problem quite well, though I am wondering whether we could find something a bit more elegant? Since Kirby 4 will be released soon, I think a breaking change would be easier to justify at this point if this will land in a future release of the plugin. |
Actually, I tested this with Kirby 4, and looks like it fails with some error, so we can hold off on this implementation for now. Do you have any ideas on any better ways to implement it? |
Note that this is still a hack. Don't merge!
@@ -74,7 +74,7 @@ public function get( | |||
bool $siteFallback = false, | |||
bool $configFallback = false, | |||
mixed $fallback = null | |||
): Field { |
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.
@srijan Please add a "to do" comment, so I can add the type check again for later.
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.
I've replaced the Field namespace in the use section instead. This, I think, makes it incompatible with v3.
For reference, this is the error returned if I keep the
|
@srijan I am aware of this issue … the namespace of |
@srijan Thanks, will look into this soon. Please have a bit of patience. Just released a 1.0.0 as final version for Kirby 3. |
Please don't feel pressured. Take your time 👍 |
WIP: Does not support preview yet.
Ref #37.
My use case: in some types of pages, I don't want to append title separator and site title to the page title.
One alternative implementation is to provide a boolean in the pageModel->metadata() function that controls whether to append the site title to the page title.
Let me know if you want me to change the implementation.