getgrav / grav-plugin-login

Grav Login Plugin
http://getgrav.org
MIT License
44 stars 54 forks source link

Option to show "Login" link #251

Closed HunterDG closed 4 years ago

HunterDG commented 4 years ago

I hope I'm not missing something obvious, but a setting in the Login plugin to show "Login" link in the menu (where "Logout" is when logged-in) would be very nice!

rhukster commented 4 years ago

Just copy the partials/login-status.html.twig file into your theme's templates/ folder (keep the partials dir) and edit it as you need:

https://github.com/getgrav/grav-plugin-login/blob/develop/templates/partials/login-status.html.twig

Or just take this example and directly copy/paste it into your theme's menu/header.

HunterDG commented 4 years ago

Thanks, I've done this, but thought a simple toggle would be nice. :) Had to modify both base and login-status twigs, so maybe it's not exactly straightforward for a toggle at this time, but maybe future enhancement?

for reference (quark theme)

`base.html.twig` ```twig [...]

{% block header %} [...] {% endblock %} [...] ``` `login-status.html.twig` ```twig ```