Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • valthebault Friend
    #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/fr

    but I can’t find the code mentionned in the post in my template files.
    Could you help? Thanks

    Ninja Lead Moderator
    #941318

    Hi,

    You can apply this to templates/ja_mono/error.php file

    Regards

    valthebault Friend
    #941367

    Hi,

    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 Moderator
    #941413

    I 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

    valthebault Friend
    #941432

    Hi,

    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 Moderator
    #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.

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 5 replies, has 2 voices, and was last updated by  Ninja Lead 8 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum