Logout "button" after logging as user


#1

Hello There! I am new to Grav community and i am trying to setup a website where part of it will be public and part of it will be private and only users that login will be able to see it.

I have seen that what suits me best is the plugin “private site” which is doing exactly as i want to. BUT what i notice is this.

When i am using the theme Quark, everything is fine and i see a Logout option on the top right side of the screen. When i change the theme to another, I am not able to see that logout option. Do you know what should i do inorder to show it to the rest of the themes as well? (I have tried the themes: Editoria, Masonry, Medium).

Thank you in advance for your help.


#2

Hi @kostaslgr, likely this is because those other themes do not support the display of the logout link.

I am not familiar with the specifics, but here is what that template code looks like in Quark:

Perhaps you can add what you need (based on the above) into the theme you are using?


#3

Thank you for your important reply! I took your advice and i edited in Notepad+ the base.html.twig file of the template. If i update the theme, will i have to change it again after the update everytime the theme updates?

BTW do you know any other way to edit the files apart from Notepad+?


#4

If you want to make a permanent change to a theme it is best to create either an inherited (small change) or child theme (large changes). For what you describe an inherited theme sounds like a good approach, as described here:

https://learn.getgrav.org/themes/customization#theme-inheritance

Since Grav is file based you can edit the files in a variety of tools - I use Atom.io myself, and on occasion I’ve also used Brackets.io and the more developer-oriented VSCode (https://code.visualstudio.com/)


#5

Thank you once again! I will study what you gave me and improve my skills. These are my first steps to Grav, and i apologize if i ask very simple questions.


#6

Happy to be of help @kostaslgr - we all started knowing nothing about Grav🙂