<?php if (ibtmedia_pulse_is_any_pulse_page()) { ?> <article class="pulse-teaser <?php if ($image_style == 'pulse_teaser') { echo 'image-teaser'; } else { echo 'video-teaser'; } ?> clearfix"> <?php if ($image) { ?> <div class="image"> <?php echo $image; ?> </div> <?php } ?> <?php if (!empty($tags)) { ?> <div class="category"> <?php echo $tags; ?> </div>
/** * Preprocess variables for page.tpl.php * * @see page.tpl.php */ function ibtimes_my_preprocess_page(&$variables) { if (module_exists('ibtmedia_pulse') && ibtmedia_pulse_is_any_pulse_page()) { // Primary nav $variables['primary_nav'] = FALSE; if ($variables['main_menu']) { // Build links $variables['primary_nav'] = menu_tree(variable_get('menu_main_links_source', 'main-menu')); // Provide default theme wrapper function $variables['primary_nav']['#theme_wrappers'] = array('menu_tree__primary'); } } }
/** * Preprocess variables for page.tpl.php * * @see page.tpl.php */ function ibtimes_ph_preprocess_page(&$variables) { if (module_exists('ibtmedia_pulse') && ibtmedia_pulse_is_any_pulse_page()) { // Primary nav $variables['primary_nav'] = FALSE; if ($variables['main_menu']) { // Build links $variables['primary_nav'] = menu_tree(variable_get('menu_main_links_source', 'main-menu')); // Provide default theme wrapper function $variables['primary_nav']['#theme_wrappers'] = array('menu_tree__primary'); } } $node = isset($variables['node']) ? $variables['node'] : NULL; if ($node) { if (!ibtmedia_core_is_backend_theme()) { $addthis_config = 'var addthis_config = {};'; $profile_id = variable_get('ibt_addthis_pubid', 'ra-4fd117ff2700b0d1'); drupal_add_js($addthis_config, array('type' => 'inline', 'group' => 185)); $variables['page']['footer']['addthis'] = array('#markup' => sprintf('<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=%s" async="async"></script>', $profile_id)); } } }