You are here

featured_content-more.tpl.php in Featured Content 6

Default theme implementation to wrap featured_content read more pages.

Available variables:

  • $more_classes: A string containing the CSS classes for the DIV tag.
  • $more_classes_array: An array containing each of the CSS classes.
  • $block_settings: An array of the block's settings. Includes type and block data.

-- some example data: -- $block_settings['title'] -- $block_settings['header'] -- $block_settings['footer'] -- $block_settings['links'] -- $block_settings['full_nodes'] -- $block_settings['teasers'] -- $block_settings['rss-link'] -- $block_settings['style']

See also

template_preprocess_featured_content_block()

theme_featured_content_block()

File

featured_content-more.tpl.php
View source
<?php

/**
 * @file
 * Default theme implementation to wrap featured_content read more pages.
 *
 * Available variables:
 * - $more_classes: A string containing the CSS classes for the DIV tag.
 * - $more_classes_array: An array containing each of the CSS classes.
 * - $block_settings: An array of the block's settings. Includes type and block data.
 * -- some example data:
 * -- $block_settings['title']
 * -- $block_settings['header']
 * -- $block_settings['footer']
 * -- $block_settings['links']
 * -- $block_settings['full_nodes']
 * -- $block_settings['teasers']
 * -- $block_settings['rss-link']
 * -- $block_settings['style']
 *
 * @see template_preprocess_featured_content_block()
 * @see theme_featured_content_block()
 */
if ($block_settings['links']) {
  ?>
  <div class="featured-content-more <?php

  print $more_classes;
  ?>">
    <?php

  if (isset($block_settings['header']) && !empty($block_settings['header'])) {
    ?>
      <div class="featured-content-block-header">
      <?php

    print $block_settings['header'];
    ?>
      </div>
    <?php

  }
  ?>
    <?php

  if (!empty($block_settings['full_nodes']) || !empty($block_settings['teasers'])) {
    ?>
      <div class="featured-content-more-content">
        <?php

    $node_views = !empty($block_settings['full_nodes']) ? $block_settings['full_nodes'] : $block_settings['teasers'];
    ?>
        <?php

    foreach ($node_views as $node_view) {
      ?>
          <?php

      print $node_view;
      ?><br/>
        <?php

    }
    ?>
      </div>
    <?php

  }
  elseif (!empty($block_settings['links'])) {
    ?>
      <?php

    if (!isset($block_settings['style']) || $block_settings['style'] == 'div') {
      ?>
        <div class="featured-content-more-content">
        <?php

      foreach ($block_settings['links'] as $link) {
        ?>
        <div class="featured-content-more-content-item"><?php

        print $link;
        ?></div>
        <?php

      }
      ?>
        </div>
      <?php

    }
    else {
      ?>
        <<?php

      print $block_settings['style'];
      ?> class="featured-content-more-content">
        <?php

      foreach ($block_settings['links'] as $link) {
        ?>
          <li><?php

        print $link;
        ?></li>
        <?php

      }
      ?>
        </<?php

      print $block_settings['style'];
      ?>>
      <?php

    }
    ?>
    <?php

  }
  ?>
    <?php

  if (isset($block_settings['footer']) && !empty($block_settings['footer'])) {
    ?>
      <div class="featured-content-block-footer">
      <?php

    print $block_settings['footer'];
    ?>
      </div>
    <?php

  }
  ?>
    <?php

  if (isset($block_settings['rss-link']) && !empty($block_settings['rss-link'])) {
    ?>
      <div class="featured-content-more-rss-link">
      <?php

    print $block_settings['rss-link'];
    ?>
      </div>
    <?php

  }
  ?>
  </div>
<?php

}