Skip to content

Instantly share code, notes, and snippets.

Created January 22, 2014 15:49
Show Gist options
  • Save anonymous/8561141 to your computer and use it in GitHub Desktop.
Save anonymous/8561141 to your computer and use it in GitHub Desktop.
<!-- Featured Events SLider -->
<section id="nowatrmcad-slider" class="clearfix">
<div class="contain">
<div id="nowatrmcad-slider-content">
<div id="nowatrmcad-slider-content-wrapper">
<div id="nowatrmcad-slides">
<figure>
<?php
$count = 0;
foreach($articles as $node):
$img = $node->field_image['und'][0]['uri'];
$style = "nowatrmcad_slider";
$img = image_style_url($style, $img);
?>
<a href="<?php print drupal_lookup_path('alias',"node/".$node->nid); ?>" id="nowatrmcad-slide<?php echo $count + 1; ?>"><img alt="" height="470" src="<?= $img ?>" width="670" /></a>
<?php
$count++;
endforeach;
?>
</figure>
</div>
<aside id="nowatrmcad-slides-nav">
<ul>
<?php
$count = 0;
foreach($articles as $node):
?>
<li <?php if($count == 0):?>class="active"<?php endif; ?>>
<a class="heading" href="#nowatrmcad-slide<?php echo $count + 1; ?>"><h4><?php print $node->title; ?></h4></a>
<div class="slider-text">
<p><?php print strip_tags($node->body['und'][0]['value']); ?></p>
<em><a href="<?php print drupal_lookup_path('alias',"node/".$node->nid); ?>">Continue reading</a></em>
</div>
</li>
<?php
$count++;
endforeach;
?>
</ul>
</aside>
</div>
</div>
<nav class="view-more" id="scroll_position">
<a class="button" href="/news"><span>View More News Articles</span></a>
</nav>
</div>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment