-
AuthorPosts
-
June 16, 2016 at 3:07 pm #941163
Hi,
I’d like to personnalise my 404 and I tried to follow instructions from this post:
https://docs.joomla.org/Creating_a_Custom_404_Error_Page/frbut I can’t find the code mentionned in the post in my template files.
Could you help? ThanksNinja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
June 17, 2016 at 3:29 am #941318Hi,
You can apply this to templates/ja_mono/error.php file
Regards
June 17, 2016 at 7:25 am #941367Hi,
I tried to do that but i don’t have this line of code:
if (($this->error->getCode()) == '404') { header('Location: /index.php?option=com_content&view=article&id=75'); exit; }
What I have is this:
<?php echo $this->error->getCode(); ?> - <?php echo $this->title; ?>
It seems like I don’t have anything indicating
header('Location: /index.php?option=com_content&view=article&id=75'); exit
This is what I have
<?php echo $this->error->getCode(); ?> - <?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?> direction == 'rtl') : ?> get('debug_lang', '0') == '1' || $app->get('debug', '0') == '1') : ?>
<body class="page-error"> <div class="main"> <div class="error"> <div id="outline"> <div id="errorboxoutline"> <div class="error-code"><?php $errcode = str_split($this->error->getCode()); $i = 0; $lastclass=''; foreach($errcode as $c){ $firstclass = ($i==0)?'first':''; if($i==(count($errcode)-1)){ $lastclass='last'; } echo '<span class="'.$lastclass.$firstclass.'">'.$c.'</span>'; $i++; } ?> </div> <div class="wrap-text"> <div class="detail-message has-des"> <div class="error-message"><?php echo $this->error->getMessage(); ?></div> <div class="des-message"><?php echo JText::_('JERROR_LAYOUT_PLEASE_TRY_ONE_OF_THE_FOLLOWING_PAGES'); ?></div> </div> </div> <a class="button-home show" href="<?php echo $this->baseurl; ?>/index.php" title="<?php echo JText::_('JERROR_LAYOUT_GO_TO_THE_HOME_PAGE'); ?>"><?php echo JText::_('JERROR_LAYOUT_HOME_PAGE'); ?></a> </div> </div> </div> </div>
That’s why I need your advice on how to change the code like in the article.
Thanks
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
June 17, 2016 at 9:33 am #941413I am not sure what did you do on your site but you can follow the steps
-
Create the article link and it shows the error page from article for Joomla
- Open templates/ja_mono/error.php file and reference the link to the article link
I found the guide here and hope it helps
June 17, 2016 at 10:10 am #941432Hi,
Excuse me for being confused all the way. I understand now that I need to add the line of code mentionned in the article, I still would like to know where exactly to guanratee its fonctionality.
Also, I didn’t create an article, I simply made an image with hyperlink in Photoshop, I’d like to know if by adding the link of the image directly to the code works?
Thanks
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
June 20, 2016 at 1:49 am #941975@valthebault: In this case, you can provide me the URL of your site, admin login and FTP account via private reply. I will help you to check your custom on your site.
-
AuthorPosts
This topic contains 5 replies, has 2 voices, and was last updated by Ninja Lead 8 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum