× Support for Joomla 2.5 templates is discontinued. This forum category is read-only.

error page

6 years 8 months ago #7488 by hefinw
hefinw created the topic: error page
I have the following inserted into the error.php page in templates/jm-news-portal. I have created the article with the new error information in it, added a hidden menu link to it but it is just giving me the basic error information and not the new page information. Any help would be appreciated

defined('_JEXEC') or die;
if (!isset($this->error)) {
header('Location: /index.php?option=com_content&view=article&id=125');
$this->error = JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));

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

6 years 8 months ago #7494 by artur
artur replied the topic: error page
You should add something like this :
//get error code
$errorcode = $this->error->getCode();
if($errorcode=='404') {
header('Location: xxxx');

Best Regards.

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

Time to create page: 0.216 seconds


ul. Wałowa 10/3, 84-200 Wejherowo, registered in Centralna Ewidencja i Informacja o Działalnosci Gospodarczej
NIP/VATID: PL5882424318

Copyright © 2009-2021 Joomla-Monster.com All rights reserved.

Joomla-Monster.com and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.