Authored by lore-w

404页面

{{> layout/header}}
{{#if errorPage}}
<div class="err-page err-404 screen">
<div class="tips-404">
<p class="tip">很抱歉,您访问的页面不存在!</p>
<p class="links">
<a href="{{newProductLink}}">浏览新品</a>
&nbsp;&nbsp;
<a href="http://www.yohobuy.com/">返回首页</a>
</p>
</div>
</div>
{{/if}}
{{> layout/footer}}
\ No newline at end of file
... ...
/*
* @description: 404页面
* @author: chenglong.wang@yoho.cn
* @time: 2015/12/17
*/
.err-page {
width: 650px;
height: 200px;
overflow: hidden;
margin: 100px auto;
&:before {
content: '';
display: block;
width: 200px;
height: 200px;
background: image_url('404.png') center center no-repeat;
float: left;
}
.tips-404 {
float: left;
height: 200px;
padding-left: 20px;
.tip {
font-size: 24px;
color: #000;
margin-top: 55px;
}
.links {
font-size: 12px;
color: #666;
margin-top: 15px;
}
}
}
\ No newline at end of file
... ...
... ... @@ -80,4 +80,4 @@ a:focus {
width: 990px;
}
}
@import "home/index", "product/index";
@import "home/index", "product/index", "error";
... ...
... ... @@ -21,6 +21,7 @@ class ErrorController extends AbstractAction
public function errorAction($exception)
{
header('HTTP/1.1 404 Not Found');
header('Status: 404 Not Found');
... ... @@ -31,12 +32,11 @@ class ErrorController extends AbstractAction
$this->setTitle('页面不存在');
$this->setNavHeader('抱歉,页面不存在!', true, SITE_MAIN);
// 生成HTML (error.html)
$this->_view->html('error');
// 渲染模板
$this->_view->display('index', array(
'pageFooter' => true,
'showDownloadApp' => true,
'errorPage' => array(
'newProductLink' => '###'
),
'pageFooter' => true
));
}
... ...