update url output
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 19 Dec 2014 16:10:34 +0000 (11:10 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 19 Dec 2014 16:10:34 +0000 (11:10 -0500)
if the link is external url then add target

views/front/showBlocks.php

index 06aabe6..b38e3f4 100644 (file)
@@ -1,14 +1,14 @@
 <?php foreach ($blocks as $block):?>
 <div class="text-center small-12 medium-12 medium-centered large-uncentered large-4 columns">
         <?php if($block->url):?>
-        <a href="<?php echo $block->url;?>">
+        <a href="<?php echo $block->url;?>"<?php if($block->externalUrl){echo ' target="_blank"';}?>>
         <?php endif;?>
         <?php echo $block->thumbnail;?>
         <?php if($block->url):?>
         </a>
         <?php endif;?>
         <?php if($block->url):?>
-        <a class="title-posts" href="<?php echo $block->url;?>">
+        <a class="title-posts" href="<?php echo $block->url;?>"<?php if($block->externalUrl){echo ' target="_blank"';}?>>
         <?php endif;?>
             <h2><?php echo $block->post_title;?></h2>
         <?php if($block->url):?>