1. pearlyjones
  2. Commercial Templates
  3. Tuesday, 06 May 2014
  4.  Subscribe via email
Hi there,

I've been trying to make the Qlue 404 plugin work with one of the sites I've built using Calibra. It originally worked but at some point along the way, the 404 reverted to the ugly Joomla default page (not really sure why, but hey!).

Try as I might I can't get the Qlue one working again, and was given the following advice on the Joomla forum:

"Make an article that is going to be your 404 page, and then make a new menu with "404" as one of the menu items. This should be a Single Article menu type displaying your 404 article. Don't make a module to display this menu as there isn't any need to have a clickable link to a 404 page."

So i did all that. But then the instructions said:

"Next edit the error.php file in yousite/templates/yourtemplate/error.php

Right under
Code:
defined('_JEXEC') or die;
add:
Code:
if ($this->error->getCode() == 404) {
header('Location: /404');
exit;
}
"

And that is where I found a problem. I can't seem to find the error.php file for my template Calibra, and am summising it may not have one?

Does the template have a error.php file I can alter, or should I be looking elsewhere for the file?

Please can you tell me if there is a way to build a custom 404 within the template? Or am I stuck with the ugly Joomla one?
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Heather

If you are going with the Qlue plugin you can create your own error.php. Simply create the file on your server in the root of your template folder (../templates/j51_calibra/error.php and add the following code...


<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

if ($this->error->getCode() == 404) {header('Location: /404'); exit; }
?>


You have to turn on URL Rewriting for this to function correctly.

CiarĂ¡n
  1. more than a month ago
  2. Commercial Templates
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!