add "visit site" link on top left of Wagtail's admin UI (menu / sidebar)
See original GitHub issueHello,
Is your proposal related to a problem?
I think there should be a link to return to the site home page from the Wagtail’s admin like there is in a lot of CMS and even in the django-admin !
example in Wordpress :
In order to do that, I usually create a custom wagtail admin template which works great !
But sometimes, Wagtail’s update can “break” some parts of the UI of my custom template : with the latest update (from 2.15 to 2.16) I had to manually update my custom template to add new features of the wagtail UI (ex: the arrow button of the menu).
I know there is the solution to use the register_admin_menu_item
hooks but the link will be under the logo and I think it would be better to place the link upper on the UI (top-left is a good place IMO).
https://docs.wagtail.org/en/stable/reference/hooks.html#register-admin-menu-item
Describe the solution you’d like
It would be great to add a link on top left of the Wagtail’s admin
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
@nyleza @gasman we have this link in many applications:
If you want to link to be multisite dependent (e.g. based on permissions) you can alter the url of the button by making a custom
MenuItem
and override thedef get_context(self, request):
method as via therequest
you’ll have your authenticateduser
available.The same method can be used to set the url based on the
Site
, depending on your needs.Note. A similar issue was raised a while ago - I have closed it as a duplicate of this one. https://github.com/wagtail/wagtail/issues/2047
I personally think that this feature is useful but could be well served using our existing menu hooks system.
In general - adding links above the bird would be good to be able to add without too much complexity.