Joomla!-开源天空

2008-10-12
首页 专栏热点 Joomla! 应用 如何自定义Joomla!模板的error page


如何自定义Joomla!模板的error page

E-mail

Joomla!系统的默认error pages可以由模板目录中的指定名称的自定义错误页面替代,不同的http错误代码对应着不同的error page,以下是几个error page的命名和路径规则:

templates/<template-name>/403.php (HTTP Status code: 403 Forbidden) 
templates/<template-name>/404.php (HTTP Status code: 404 Not Found)
templates/<template-name>/500.php (HTTP Status code: 500 Internal Server Error)
templates/<template-name>/component.php (not sure when this is used)
templates/<template-name>/offline.php ("Site is offline" error page)

放在<template-name>目录下的error将替代在 /templates/system目录下的error page,如果开启了调试模式,在error page中可以调用renderBacktrace方法显示错误信息。


<?php if ($this->debug) :
 echo $this->renderBacktrace();
endif; ?>

注意: jdoc:include elements 不能在error pages 中使用

原文地址: http://docs.joomla.org/Custom_error_pages



收藏此文章:
Digg! Reddit! Del.icio.us! JoomlaVote! Google! Live! Facebook! StumbleUpon! Yahoo! Free social bookmarking plugins and extensions for Joomla! websites!

发表您的文章评论

您的姓名 (昵称)
标题:
评分: 很差一般较好很好
评论:
验证码:
请输入验证码