-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
All pages have title "LinkAce" #691
Comments
Related: #584 "Use tag & lists name for HTML title" Possible solution: In
The separator is chosen as a hyphen, but maybe that should be something else (em dash, pipe) or be configurable. I first made it part of the page title system setting, but then any pages without title (e.g. the homepage) would have the separator prepended as well. That's okay if pages always have titles, though. The contents of Now, the page title can be chosen by the controller, e.g. Fortify::loginView(function () {
return view('auth.login', [
'pageTitle' => 'Login',
]);
}); As another example, here's what I used for tags ( ...
return view('models.tags.index', [
'pageTitle' => 'Tags',
'tags' => $tags,
...
public function create(): View
{
return view('models.tags.create', [
'pageTitle' => 'Add tag',
]);
}
...
return view('models.tags.show', [
'pageTitle' => $tag->name,
'tag' => $tag,
...
public function edit(Tag $tag): View
{
return view('models.tags.edit', [
'pageTitle' => 'Edit tag: ' . $tag->name,
'tag' => $tag,
]);
} This is how it comes out in my browser: To support translations, it looks like the solution is to add the translation entry and call Another solution uses views instead of passing it from the controller. I should first have looked up what the standard Laravel way of doing this is instead of just starting with the first idea that came to mind, to be honest. I'd probably have gone for the view-based option. @Kovah let me know if you would like this as a pull request anyway (with translations support). |
Looks good to me. |
Bug Description
My browser history is useless now because all pages in LinkAce have the title "LinkAce".
How to reproduce
Expected behavior
Each page should have a sensible page title.
Logs
No response
Screenshots
No response
LinkAce version
v1.12.2
Setup Method
PHP
Operating System
Linux (Ubuntu, CentOS,...)
Client details
No response
The text was updated successfully, but these errors were encountered: