Drupal - dynamically add class to wrapping div based on panel pane content node type -
am using drupal 7 panels everywhere module , have set panel page template homepage. problem need add class wrapping div in template dependant on node type inside panel pane inside wrapper. needs added dynamically our site editors moving panel panes around lot.
i.e. row template looks this:
<div class="content_wrapper"> <div id="main-content-row1" class="content"> <?php print render($content['content-row1']); ?> </div> </div>
and want dynamically add class on 'content_wrapper' div dependant on node type inside $content['content-row1'].
find tpl.php file prints panel layout panels module (it can found under "panels/plugins/layouts/your_layout" folder) , copy in theme folder.
in tpl.php file add php code same way edit drupal themes.
Comments
Post a Comment