Set different home pages for registered users and guests

Moderators: mandville, PhilD, General Support Moderators

Post Reply
ApolloLV
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Sep 01, 2016 3:29 pm

Set different home pages for registered users and guests

Post by ApolloLV » Thu Sep 01, 2016 3:36 pm

Hi together,

We have a joomla website requiring registration+login for all user actions.
There are already guest users and logged-in user groups defined, and they get different menus:
1. Containing login and registration
2. Containing a dashboard, other content and logout

I want the user to be directed to the login page upon visiting the index.php when not logged in, but to the dashboard as long as the user is logged in.

How do I do that? The backend only lets me define 1default page.

User avatar
sozzled
Joomla! Champion
Joomla! Champion
Posts: 5503
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Set different home pages for registered users and guests

Post by sozzled » Thu Sep 01, 2016 7:14 pm

ApolloLV wrote:I want the user to be directed to the login page upon visiting the index.php when not logged in, but to the dashboard as long as the user is logged in.
That is fairly easy to do. There are settings in the Joomla login module (or menu item) that allow you to set the target of the page after the person has logged-in.
The backend only lets me define one default page.
That's right. The default page (sometimes called the home page) is the view that is presented when a person enters the "basic" URL (e.g. http://www.mydomain.com). Usually, before people login, they will view the home page. Usually you will have a "home page" menu item.

If you like, you could have two "home page" menu items. One of these menu items could be the current default menu item with the permission of Guest and you could create another menu item (with the target of your "control panel") with the permission of Registered.
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

ApolloLV
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Sep 01, 2016 3:29 pm

Re: Set different home pages for registered users and guests

Post by ApolloLV » Fri Sep 02, 2016 10:09 am

sozzled wrote:
ApolloLV wrote:I want the user to be directed to the login page upon visiting the index.php when not logged in, but to the dashboard as long as the user is logged in.
That is fairly easy to do. There are settings in the Joomla login module (or menu item) that allow you to set the target of the page after the person has logged-in.
The backend only lets me define one default page.
That's right. The default page (sometimes called the home page) is the view that is presented when a person enters the "basic" URL (e.g. http://www.mydomain.com). Usually, before people login, they will view the home page. Usually you will have a "home page" menu item.

If you like, you could have two "home page" menu items. One of these menu items could be the current default menu item with the permission of Guest
Yes, I already have this set up and working.
and you could create another menu item (with the target of your "control panel") with the permission of Registered.
I already have that Item, but how do I get the users to be directed to that page if they visit the "basic" url as a registered user?
I know how to set either page as the default page, but how both?

User avatar
sozzled
Joomla! Champion
Joomla! Champion
Posts: 5503
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Set different home pages for registered users and guests

Post by sozzled » Fri Sep 02, 2016 8:04 pm

ApolloLV wrote:How do I get the users to be directed to that page if they visit the "basic" url as a registered user?
Think about it: how does a website know that someone is a "registered user" before they have logged it? It is only after someone has logged-in that they are recognised as a registered user. Therefore, if someone simply visits your site, by typing the URL in their browser, how can they possibly be recognised as a registered user until they have actually logged in? ???

In other words, if someone simply enters the URL of your site into their browser, they will access the target of whatever menu item you have set as the default.

The topic subject says "set different home pages for registered users and guests". That's a different proposition to your question about a default menu item. I explained that you can have two different "home page" menu items: one item has the permission of Guests and the other item has the permission of Registered. You make the guest "home page" menu item the default one. You can only have one default menu item, however.

What seems to be the problem with my explanation?
https://www.kuneze.com/blog
Former member of Kunena project team
If you think I’m wrong then say “I think you're wrong.” If you say “You’re wrong!”, how do you know?

jsozzie33
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Nov 20, 2017 11:52 pm

Re: Set different home pages for registered users and guests

Post by jsozzie33 » Wed Feb 07, 2018 2:39 am

Hello - Here's why your explanation doesn't quite work for me. I have different menu items for registered users and visitors, but the logo in the header goes to the visitor home (landing) page. So when a registered user clicks on the logo, they get an error message saying they've been logged out. They haven't actually been logged out if they hit the back button, but I want them to go to the registered users home page

I guess I need to have different versions of the logo resolving to different pages, but I'm not sure how to do it.

Thanks,
Newbie Scott

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 24731
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Set different home pages for registered users and guests

Post by Per Yngve Berg » Wed Feb 07, 2018 10:13 pm



Post Reply

Return to “Access Control List (ACL) in Joomla! 3.x”