Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

Redirection after login, using menu alias

  • ioasla
  • ioasla
  • OFFLINE
  • Posts: 2
  • Thanks: 0
  • Karma: 0
12 years 2 months ago #210607 by ioasla
Greetings to all!

I will briefly explain the case...
I have a site where I use a Main Menu to browse through the different topics. I want all the menu items to be visible however when the user clicks on them he should be asked to login. When leaving the menu items public it had no effect since you can acess i.e. a category list layout even if all the articles are marked as registered.

In a few words I created an identical menu with all the menu items defined as menu alias to the original ones. Indeed when you click to the public alias menu items pointing to the original registered ones then a login form appears!!

Here comes the tricky part, I have community builder installed and use the cb_login module, however the form that appears corresponds to the joomla login module. In order to use the cb module I edited the includes/application.php file changing line 325 from $url='index.php?option=com_users&view=login'; to $url='index.php/component/comprofiler/login';. This also actually worked but eventually led to my final problem...When I log in I'm being redirect to the Homepage instead of the exact page I was trying to access.When for example try to reach the registered menu item index.php/download I'm being redirected to index.php/component/comprofiler/login/download and when I log in straight to the domain homepage (not even index.php)

Let me also note that with the original joomla login module the redirection works fine but I don't want to use both of these modules.

I'm really sorry for this huge post but I'm open even to a completely different implementation, any idea is valuable

Best Regards

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum