CSS inside PHP statement -
i have php statement inside body 1 page not take property of body
<body id="page-top" class="single" <?php $actionid = $this->context->action->id; $pages =yii::$app->params['page']; if(!in_array($actionid,$pages) ? 'style="padding-top:10px;"' :'') ?>>
everything working not css. have inserted in wrong place?
'style="padding-top:10px;"' :'')
did forgot echo before 'style="padding-top:10px;"'
?
also use if
, ?
-operator. use 1 of them :)
<body id="page-top" class="single" <?php $actionid = $this->context->action->id; $pages =yii::$app->params['page']; echo (!in_array($actionid,$pages)) ? 'style="padding-top:10px;"' : ''; ?> >
wiki
Comments
Post a Comment