You are here

instagram.tpl.php in Social Feed 7.2

Same filename and directory in other branches
  1. 7 templates/instagram.tpl.php

This template handles the layout of Social Feed instagram block.

Variables available:

  • $instagram_images: An array of the Instagram pictures.
  • $instagram_image: A single picture fetched from $instagram_image.

File

templates/instagram.tpl.php
View source
<?php

/**
 * @file
 * This template handles the layout of Social Feed instagram block.
 *
 * Variables available:
 * - $instagram_images: An array of the Instagram pictures.
 * - $instagram_image: A single picture fetched from $instagram_image.
 */
?>
<ul>
  <?php

foreach ($instagram as $instagram_image) {
  ?>
    <li>
      <?php

  if (!empty($instagram_image['permalink'])) {
    ?>
        <a target="_blank" href="<?php

    echo $instagram_image['permalink'];
    ?>">
          <img src="<?php

    echo $instagram_image['media_url'];
    ?>"></a>
      <?php

  }
  else {
    ?>
        <img src="<?php

    echo $instagram_image['media_url'];
    ?>">
      <?php

  }
  ?>
    </li>
  <?php

}
?>
</ul>