Secure Zones - Logout button
under review
J
Jayne Cooter
At the moment the only way to log out of a secure zone is by using the pre-built logout button; we would like to implement this as part of the navigation but it's not possible without doing a bit of a hacky workaround. BC had a set link to achieve this.
Log In
Matt Walter
under review
Matt Jones
Hi everyone,
This is highly up-voted so we'd like to make sure we fully understand what voters need from this feature.
To address Jayne's points, we believe most of this is already possible, but please let us know if we have not fully understood yet!
- It is possible to add Logout as a Menu Item. Although it can't be added by the Client via Menu Builder (is this something voters would need?), it can be nested within the wrapper.liquid file of the Menu Layout. (See screenshot 1) In its own Layout, it can also be given any CSS classes needed to be displayed there e.g. "menu-item". (See screenshot 2)
- You can use the Logout button's custom Layout to change the HTML structure and make the submit button display as a logo.
Starter Site is a good example of both of the above- to check it out, just select the "Starter Site" toggle when creating a Site, and explore the "sign up", "log in" and "log out" options.
We'd be really grateful if voters could let us know what's missing from this feature for them so we can start work. If there's nothing else to add, we'll close the task and focus on other feature request priorities.
Thanks a lot!
J
Jayne Cooter
Matt Jones: HI Matt,
The issue really lies when the button needs to be placed somewhere that isn't top level, so for example, having the log out button as part of a dropdown in the navigation - I think I'm right in saying that wouldn't be achievable with the suggested solution?
Thanks :)
Matt Jones
Jayne Cooter: Thanks- this makes sense now. Thanks a lot for the clarification!
Matt Jones
Hi Jayne, please could you explain a little more what you are proposing? How could the logout button be improved to make it easier to add to a navigation bar?
Currently Starter Site does demonstrate the use of the button within the navigation, but perhaps you are thinking of a slightly different use case?
J
Jayne Cooter
Matt Jones: Morning Matt, I'd like to add Logout as a Menu item or have it on an icon etc. I've never actually used Starter Site.
Matt Jones
Okay I understand you'd like an easier way to add it, via Menu builder.
If you did want to take a look at how we demonstrate this on Starter Site, the advantage of this is that you can use Liquid logic to display the most appropriate button for the User's current session state e.g. only show the Logout button when the User is logged in: