public menu item —> restricted function?

General questions relating to Joomla! 5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
User avatar
JAVesey
Joomla! Hero
Joomla! Hero
Posts: 2637
Joined: Tue May 14, 2013 1:21 pm
Location: Cardiff, Wales, UK
Contact:

public menu item —> restricted function?

Post by JAVesey » Thu Mar 28, 2024 12:31 pm

Never had to do this before and can’t seem how to make it happen.

I have a menu item that links to a component that is only available to registered users. Clicking on the menu item when no logged in throws a 403 error (you do not have access…). I can’t have that, so I’ve had to make the menu item visible only when logged in.

How can I make the menu item public, direct it to a login page and then, when logged in, go directly to the component? There are no modules or articles involved, only plugins.

TIA
John V
Cardiff, Wales, UK
Joomla 5.1.0 "live" site on PHP 8.2.15 and MariaDB 10.11.7
Joomla 5.1.0 on XAMMP for OSX with PHP 8.2.4 and MariaDB 10.4.28

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

Re: public menu item —> restricted function?

Post by Per Yngve Berg » Thu Mar 28, 2024 3:44 pm

I presume you are familier with the Register to Read More for Articles. Make a Guest Menu Item that points to an Article that explained what you get access to after registrering.

User avatar
JAVesey
Joomla! Hero
Joomla! Hero
Posts: 2637
Joined: Tue May 14, 2013 1:21 pm
Location: Cardiff, Wales, UK
Contact:

Re: public menu item —> restricted function?

Post by JAVesey » Thu Mar 28, 2024 7:13 pm

Per Yngve Berg wrote:
Thu Mar 28, 2024 3:44 pm
I presume you are familier with the Register to Read More for Articles. Make a Guest Menu Item that points to an Article that explained what you get access to after registrering.
Thank you, but not quite what I’m after. A note/notice like you suggest is available on my site’s homepage.
John V
Cardiff, Wales, UK
Joomla 5.1.0 "live" site on PHP 8.2.15 and MariaDB 10.11.7
Joomla 5.1.0 on XAMMP for OSX with PHP 8.2.4 and MariaDB 10.4.28

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

Re: public menu item —> restricted function?

Post by Per Yngve Berg » Thu Mar 28, 2024 8:01 pm

Use two Menu Items.

One that points to Registration set as Guest.

The other set as Registered.

Only one of these two will show at a givende time.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44097
Joined: Sat Apr 05, 2008 9:58 pm

Re: public menu item —> restricted function?

Post by Webdongle » Thu Mar 28, 2024 8:43 pm

Create a 403 redirect to a login menu item. Should be doable with Joomla's redirect component.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".


Post Reply

Return to “General Questions/New to Joomla! 5.x”