Skip to content
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

"My page" text inconsistent with other links #5071

Open
miqrogroove opened this issue Dec 5, 2024 · 5 comments
Open

"My page" text inconsistent with other links #5071

miqrogroove opened this issue Dec 5, 2024 · 5 comments

Comments

@miqrogroove
Copy link
Contributor

<a class="nav-link active" href="<?= e(route(HomePage::class)) ?>"><?= I18N::translate('My page') ?></a>

This is the admin link to the HomePage. It is titled "My page", however the route is for the "Home page". This text is coded into the view, which creates a cosmetic problem if a custom module rebinds the HomePage to a different route.

I suggest either changing the text to "Home page" or relocating the text to a more pluggable location.

@fisharebest
Copy link
Owner

The HomePage route doesn't actually display a page. It redirects to the default tree, with TreePage for visitors and MyPage for logged-in users.

Since the user is currently logged in, this link will take the user to MyPage.

So the label is correct for a default installation.

But I get your point that a module can replace HomePage with something else.

I suggest either changing the text to "Home page"

This would be wrong, I think, as we don't have such a page.

Maybe something like "Exit control panel", or "Back to site"? But I'm not totally happy with these.

Suggestions?

@miqrogroove
Copy link
Contributor Author

Is there not an underlying module or view filter that makes this pluggable instead of hard-coded-plus-translation? 🤔 Could the I18N::translate('My page') call be wrapped in a filter function or similar extra step? Should I attempt to replace the entire view for the sake of a simple module?

@kiwi3685
Copy link
Contributor

kiwi3685 commented Dec 5, 2024

If it's of any interest, in my personal theme I replaced that link with two:

  • "Family tree Page" (This includes the drop down choice of family trees if appropriate)
  • "My page"

So the same two links that appear on most other pages outside the control panel.

It works for me, but perhaps not for everyone?

@fisharebest
Copy link
Owner

@miqrogroove - you gave a 👍 but surely this won't help you.

You've replaced HomePage - presumably with some sort of content page - and so replacing the current link with these options won't help you at all...? None of these options will go to HomePage.

@miqrogroove
Copy link
Contributor Author

Currently I'm replacing the HomePage with a route to the tree, so simply providing a tree link is an improvement for me. Sending me from the Control Panel to the My Page is just an extra step that I prefer to avoid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants