public function PanelizerEntityNode::preprocess_panelizer_view_mode in Panelizer 7.3
Preprocess the entity view mode template.
Overrides PanelizerEntityDefault::preprocess_panelizer_view_mode
File
- plugins/
entity/ PanelizerEntityNode.class.php, line 245 - Class for the Panelizer node entity plugin.
Class
- PanelizerEntityNode
- Panelizer Entity node plugin class.
Code
public function preprocess_panelizer_view_mode(&$vars, $entity, $element, $panelizer, $info) {
parent::preprocess_panelizer_view_mode($vars, $entity, $element, $panelizer, $info);
if (!empty($entity->promote)) {
$vars['classes_array'][] = 'node-promoted';
}
if (!empty($entity->sticky)) {
$vars['classes_array'][] = 'node-sticky';
}
if (empty($entity->status)) {
$vars['classes_array'][] = 'node-unpublished';
}
}