Making a default webpage for WEbsite users

Hello,

I want to know if something in the new version is changing to make a default site for Website user. In V4 i use the hook.py to do this.

role_home_page = {
“father”: “default_webpage”
}

Now, it’s not working.

See if is this what you want:

website_route_rules = [
{“from_route”: “/father”, “to_route”: “default_webpage”},
]

Or this:

home_page=[“default_webpage”]
and
base_template=[“templates/any_base_template.html”]

It’s not working. Furthermore, i want to redirect based on role.

Always login redirect to /me page.

Works with me. Look at frappe hook.py for website_route_rules.

But if you look in utils.py line 35 get_home_page() you see that hook role_home_page it is there.
Also it is called by function resolve_path in line 184 of render.py. Look the code and see what are you doing wrong.

If it is not working try to clear-cache because that user could have previous home_page defined. Also, of course, that user need to have that role defined.

2 Likes

Thanks for your time. It’s working