How to input the Error message inside the 404 page
-
Chacapamac
-
Topic Author
-
Offline
-
Junior Member
-
Less
More
-
Posts: 37
-
Thank you received: 0
-
-
8 years 3 months ago #5225
by Chacapamac
I was able to bring an article and all the menu and attached modules of a test site by creating an article/menu/category Error.
I simply add the url of that article in a custom 404 page in Redj component by adding —>
{site url}/index.php/en/index.php?option=com_content&view=article&id=30:error-article&catid=24:error&lang=en-GB&Itemid=330
Probably not the way it work but this can allow me to present an error message page with all the surrounding context module I need.
The only problem is to display your dynamic {error message} in the article or anywhere else?
Any Idea?
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
8 years 3 months ago #5227
by admin
Hi,
you can create custom error 404 pages using the "Pages 404" function under ReDJ Manager. Each page can include HTML code and supports the following macros:
{siteurl} Site web address
{sitename} Web site name
{sitemail} Address used to send site mail
{fromname} Name used to send site mail
{errormessage} Description message of occurred error
{article ID} Include an article (intro and fulltext). Replace 'ID' with content item ID to include
So you can show the error message and also include an article by its id. To use the error page, select it in plugin options.
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
-
Chacapamac
-
Topic Author
-
Offline
-
Junior Member
-
Less
More
-
Posts: 37
-
Thank you received: 0
-
-
8 years 3 months ago #5230
by Chacapamac
Thank you for your answer, but how do you bring surrounding modules Menus, header, footer and other, if you don’t use my trick.
Using the article ID bring the article and else but not the surrounding necessary module.
Using my trick work, but no way to dynamically output the error message.
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
8 years 3 months ago #5232
by admin
You are right, and the only way it could work with the current version is to try a "Javascript trick" to replace the errormessage on the client side (e.g. in the 404 error page you set a javascript variable with the message, and in the content article you use this variable to show the message).
Please Log in or Create an account to join the conversation.
-
Chacapamac
-
Topic Author
-
Offline
-
Junior Member
-
Less
More
-
Posts: 37
-
Thank you received: 0
-
-
8 years 3 months ago #5234
by Chacapamac
Do yo think using the
{site url}/index.php/en/index.php?option=com_content&view=article&id=30:error-article&catid=24:error&lang=en-GB&Itemid=330
trick is a problem or can generate bugs ?
It can be a great easy way that can replace the normal Joomla way -
docs.joomla.org/Creating_a_Custom_404_Error_Page
For now I use that way to create my custom 404, I will wait for your answer to us Redj
I think it will be a great addition to your software if you treat that trick as a real capability. It will make the possibility to add easily an in template, in context (with menu, logos et surrounding modules) custom 404. Another advantage to do it with your system is the capacity to have a multilingual custom 404, I’m not sure how it will work with the Joomla way.
One question, if this system show ONLY 404 error the fact to include the Error message {errrormessage} are not really important as you can customized it the way you want ?
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
8 years 3 months ago #5248
by admin
Hi,
sorry for delay but I was trying to figure out if I could implement this in the next ReDJ version. Not managed yet (I am out for holidays) but I will be back to this thead ASAP.
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
Time to create page: 0.163 seconds