Welcome to Joomla User Group Suffolk
| How to redirect "You need to Log In" to a content article |
|
Sometimes you might have the situation where you would rather have an informational piece of text to advise the user that they need to register to view the content article or so forth, rather than have them dumped to the "You need to log in to view this" page. Here's how!
You need to edit a couple of files to do this: /includes/application.php /components/com_contact/views/contact/view.html.php /components/com_content/views/article/view.html.php If you search for the phrase "base64_encode" you'll find the following lines: $url = 'index.php?option=com_user&view=login'; This generates the ugly long url's and dumps you at the login page. simply replace this with: $url = 'index.php?option=com_content&task=view&id=<idnumberofarticletobeshown>'; You can find the article ID by going to the Article Manager section, and looking at the ID column which will give you a number! |
