Custom Error page question

Have purchased Hertz pro, and want my image used for the euro page. I can do this by changing the image already there, BUT I do not want the Error 404 to show as my image had a custom msg. It is also larger than the supplied image ( 600 x 200)

So, here is the question:

Where do I find and change these attributes? I tried deleting the line in style css that expressed the heading, but it also deleted the image. Trying to directly implement it via html on my custom error page but that didn't work either.

Thanks

Comments

user
Submitted by bebull on Mon, 11/23/2015 - 22:24

by adding a couple of line breaks via HTML, I managed to get my error image there.

BUT I do not want the page to show a title or any other information as the usual pages do. SO, how do I implement this?

user
Submitted by admin on Tue, 11/24/2015 - 02:41

Please follow below steps:

  1. Open style.css in any text editor.
  2. Find following codes.
    /* Error Page
    ------------------------------------------------ */
    .error-page {
    text-align: center;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-size: 26px;
    background: url(images/error-icon.png) no-repeat;
    background-position: center 64px;
    }
    .error-page h1 {
    font-size: 50px;
    }

    .error-page p {
    margin-top: 115px;
    }
  3. Change above code to following.
    /* Error Page
    ------------------------------------------------ */
    .error-page {
    text-align: center;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-size: 26px;
    }
    .error-page h1 {
    font-size: 50px;
    }

    .error-page p {
    margin-top: 10px;
    }
  4. Save and close style.css
  5. Now you can create error page with your image. Something like this:
    <h1>My Custom Error Message</h1>
    <img src="path to custom error image" />
    <p>Here you can put more message if you want</p>
user
Submitted by bebull on Wed, 11/25/2015 - 20:45

So how do I get this to NOT show the node page title???

user
Submitted by admin on Thu, 11/26/2015 - 03:26

You will need to create new "Content Type" without title.

  1. Create a new content type of name notitle
    domain.com/admin/structure/types
  2. Make a copy of templates/node.tpl.php file in same folder. Rename this copied file to node--notitle.tpl.php
  3. Open node--notitle.tpl.php in any text editor and delete following codes.
    <div class="node-title">
    <div class="title-container">
      <?php print render($title_prefix); ?>
      <?php if (!$page): ?>
    <h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
    <?php else: ?>
    <h1 class="title"><?php print $title; ?></h1>
      <?php endif; ?>
      <?php print render($title_suffix); ?>

      <?php if ($display_submitted): ?>
    <div class="submitted"><div class="category"><?php print render($content['field_tags']); ?></div><?php print $submitted; ?> <span><?php print t(', Comments'); ?>: <?php print $comment_count; ?></span></div>
      <?php endif; ?>
    </div> <!-- /.title-container -->
    </div> <!-- /.node-title -->
  4. Now create a new node of content type notitle

Done!!

user
Submitted by bebull on Fri, 11/27/2015 - 21:20

Am giving it a try!

user
Submitted by bebull on Fri, 11/27/2015 - 21:46

Followed the directions precisely: opened the templates folder. copied the file, renamed it, saved it and then edited it. Made a new content type "notitle" and added my code for the error message and it's image. Saved. Logged out of my test site (am working on a virtual site at the moment using Acquia Desktop) . went to browser and tried accessing site at a non existent page. Got error message ok, but it still shows the title! So, logged back in, checked that everything was correct, cleared my caches, and repeated the test. Still shows the title "My custom error message"

What am I missing here?

user
Submitted by admin on Sun, 12/06/2015 - 10:49

Please reverse all changes. I see that Drupal insert page title irrespective of code presence.
Please give a try to Exclude Node Title module.