: Customize no access error message I am using joomla 3.x and have restricted access of some articles to certain user groups. When I am not logged in I get a really ugly message "You are not
I am using joomla 3.x and have restricted access of some articles to certain user groups. When I am not logged in I get a really ugly message "You are not authorized to view this resource".
I would like that the user sees instead a custom message and a login screen, you know the basic "Thank you for your interest in …………… please register or login" message. Is it possible to change this in the code of joomla or is there even a addon which can do that?
More posts by @Murray155
1 Comments
Sorted by latest first Latest Oldest Best
From the Joomla! online documentation:
To override the system error results, copy the templates/system/error.php file into your templates/ directory.
If it finds one, Joomla! will use the error.php file from the current template, in place of the system file.
You can format the page, as desired, to match your template.
So add something like the following to your template's error.php:
<?php if ($this->error->code == '403') : ?>
<div id="errorboxheader">Not Allowed</div>
<div id="errorboxbody"><p>Sorry! You are not authorized to view this resource. Please login or register.</p>
<!-- Copy the code of the login module here! -->
</div>
</div>
<?php endif; ?>
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.