Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

How to override content of login.md from plugin Login

plugins

Solved by pamtbaau View solution

Started by Rene 4 years ago · 4 replies · 882 views
4 years ago

Problem:
I want to overwrite the login.md of the login-plugin

Thought it could be done by copying the login.md file from user/plugin/login/pages to user/pages but it seems like I'm wrong with that
Bildschirmfoto 2022-01-29 um 10.36.37|295x500

Do I have to copy the login template files from the plugin to my theme (otherwise I can't choose it in the Admin?) and add a page in Admin or is there a better way?

4 years ago

Depends on what you want to do. You can configure the route in the plugin configuration to match any page created by you (see https://github.com/getgrav/grav-plugin-login#login-page). The login plugin will then automatically redirect to this page for any login operations. It need to be a login form of course, so basically the login template or create your own template with a login form.

👍 1
4 years ago

I just want to change the content

TXT
# User Login

to

TXT
## User Login

I wondered why I can't select the login template on a page in admin on default.
When I copy the login.html.twig into my theme, it's selectable.

But anyway's It seems like I'm overthinking that 😆

I will create a login template in my theme and change the content there, as you said.
Thank you! 😃

4 years ago Solution

@rokun, Try copying /user/plugins/login/pages/login.md into subfolder /user/pages/login/

TXT
user/pages
├── 01.home
│   └── default.md
├── 02.typography
│   └── default.md
└── login
    └── login.md

In Grav, a page is always the combination of a folder and *.md file.

👍 2
last edited 01/29/22 by pamtbaau
4 years ago

Thats it!
I didn't add the /login/ folder in my /user/page/ folder!
Thank you 💪

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 43 1 week ago
Plugins · by Xavier, 4 weeks ago
2 53 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1179 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 48 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 72 2 months ago