when Error 404 is occurred , then how to hide Search form box from this page...
Display only error on this page , hide search box and menubar from this page
if(!isset($adminView)){
?>
<div id="search" class="menu_item">
<?php
if (param('useYandexShare', 0))
$this->widget('application.extensions.YandexShareApi', array(
'services' => param('yaShareServices', 'yazakladki,moikrug,linkedin,vkontakte,facebook,twitter,odnoklassniki')
));
if (param('useInternalShare', 1))
$this->widget('ext.sharebox.EShareBox', array(
'url' => Yii::app()->getRequest()->getHostInfo().Yii::app()->request->url,
'title'=> CHtml::encode($this->seoTitle ? $this->seoTitle : $this->pageTitle),
'iconSize' => 16,
'include' => explode(',', param('intenalServices', 'vk,facebook,twitter,google-plus,stumbleupon,digg,delicious,linkedin,reddit,technorati,newsvine')),
));
/*$this->widget('zii.widgets.CMenu',array(
'id' => 'dropDownNav',
'items'=>$this->aData['topMenuItems'],
'htmlOptions' => array('class' => 'dropDownNav'),
));*/
$this->widget('CustomMenu',array(
'id' => 'sf-menu-id',
'items' => $this->aData['topMenuItems'],
'htmlOptions' => array('class' => 'sf-menu'),
'encodeLabel' => false,
'activateParents' => true,
));
?>
</div>
<?php
$showMenu = true;
if(Yii::app()->controller->route == 'site/error'){
$showMenu = false;
}
if(!isset($adminView)){
if($showMenu){
?>
<div id="search" class="menu_item">
<?php
if (param('useYandexShare', 0))
$this->widget('application.extensions.YandexShareApi', array(
'services' => param('yaShareServices', 'yazakladki,moikrug,linkedin,vkontakte,facebook,twitter,odnoklassniki')
));
if (param('useInternalShare', 1))
$this->widget('ext.sharebox.EShareBox', array(
'url' => Yii::app()->getRequest()->getHostInfo().Yii::app()->request->url,
'title'=> CHtml::encode($this->seoTitle ? $this->seoTitle : $this->pageTitle),
'iconSize' => 16,
'include' => explode(',', param('intenalServices', 'vk,facebook,twitter,google-plus,stumbleupon,digg,delicious,linkedin,reddit,technorati,newsvine')),
));
/*$this->widget('zii.widgets.CMenu',array(
'id' => 'dropDownNav',
'items'=>$this->aData['topMenuItems'],
'htmlOptions' => array('class' => 'dropDownNav'),
));*/
$this->widget('CustomMenu',array(
'id' => 'sf-menu-id',
'items' => $this->aData['topMenuItems'],
'htmlOptions' => array('class' => 'sf-menu'),
'encodeLabel' => false,
'activateParents' => true,
));
?>
</div>
<?php
}
if($this->showSearchForm){
$this->renderPartial('//site/inner-search');
}
if(Yii::app()->controller->route == 'site/error'){
$this->showSearchForm = false;
}
if($this->showSearchForm){
$this->renderPartial('//site/inner-search');
}
Return to Questions and help for changes
Users browsing this forum: No registered users and 28 guests