× Here you can get community support related to ReDJ.

Macros in Custom 404 page as Joomla Article

  • stratacorps
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 7 months ago #6248 by stratacorps
Macros in Custom 404 page as Joomla Article was created by stratacorps
On the Custom page 404, the options of Page has nice macros that work to show the error message. Is there any way to do this using the Link option and redirecting to a Joomla article (like sh404sef does--but we've removed that component completely with redj enterprise!).

I have tried various Joomla! api tricks but when I embed php code in the 404 document that tries to access the J! router information like $err->getCode(), etc. it breaks redj.

Of course the plugin doesn't render content, so I'm not getting any details of the error that caused the redirection tot he 404 link.

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

More
6 years 7 months ago #6258 by admin
Hi and sorry for delay.
Not sure if I got your question right, but it seems you need to show an article in the error page. If this is the case, you already havea macro to use in the erorr content:
{article ID} Include an article (intro and fulltext). Replace 'ID' with content item ID to include

Otherwise let me know what I'm missing here.

Thanks,
Luigi

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

  • stratacorps
  • Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago #6259 by stratacorps
Replied by stratacorps on topic Macros in Custom 404 page as Joomla Article
Its the other way around. The 404 Page option doesn’t include the site’s template structure (style, menu, module positions etc). So I am using LINK instead of Page to link directly to a custom Joomla! page. On that page I have an article (also tried a custom module) to display error information. Since the macros don’t render as a content plugin this way, I tried embedding Joomla api code to display the router’s eror code/message, but failed,

If the Page option could either embed the code inside the Joomla! environment or if I could figure out how to capture and display the reason that redj redirected the visitor to the custom link that would work. Or if redj could send along post or get variables to the link that I could display with php, etc.

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

More
6 years 6 months ago #6261 by admin
Ok, I got it.

The custom page allows you to put any HTML code, so you can try to simply paste the same code of the Joomla page you would like to use. I didn't implement the "redirect" option, because with a simple client side redirect you loose the 404 error code (it requires a 301/307). And I was not able to implement the "internal call".

Any other option you listed requires at least a little ReDJ customization.

Kind regards,
Luigi

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

Time to create page: 0.096 seconds