Hi I am trying to create a new template. I need to show images of artists with their name below. I have that done with the code below, but I need to add a website, facebook and twitter links. How can either do an overlay like the team page or just list them next to the title?
<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
<div class="content"<?php print $content_attributes; ?>>
<?php
// We hide the comments and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
//$original_image = file_create_url($node->field_portfolio_images['und'][0]['uri']);
$lightboxrel = 'artist_'.$nid;
$portfolio_images = field_get_items('node', $node, 'field_photo');
$facebook = field_get_items('node', $node, 'field_artist_facebook_link');
$first_image = '';
if($portfolio_images){
foreach($portfolio_images as $k => $portfolio_image){
if($k == 0){
$first_image = file_create_url($portfolio_image['uri']);
}else{
$image_path = file_create_url($portfolio_image['uri']);
print '<a href="'.$image_path.'" rel="lightbox['.$lightboxrel.']" style="display:none"> </a>';
}
}
}
?>
<div class="portfolio-image">
<?php print render($content['field_photo']); ?>
<!-- <?php if(!empty($content['field_artist_facebook_link'])):?>
<li><a class="facebook" href="<?php print render($content['field_artist_facebook_link'][0]);?>"><i class="fa fa-facebook"></i></a></li>
<?php endif;?>
</div>-->
<div class="mediaholder"></div>
</div>
<div class="item-description">
<h5><?php print $title; ?></h5>
<h5><?php print $field_artist_facebook_link[0]; ?></h5>
<a href="<?php print $field_artist_facebook_link[0];?>"<span class="fa fa-facebook"></span></a>
</div>
</div>
</div>
© Copyright 2013-2017 DrupalExp - All Rights Reserved
This got me a little closer. I copied the team template. The links are displaying under the picture, but they are not showing on the picture as links.
<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
<div class="content"<?php print $content_attributes; ?>>
<?php
// We hide the comments and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
?>
<div class="team">
<div class="team-item img-wrp"><?php print render($content['field_photo']); ?>
<div class="overlay"></div>
<div class="overlay-wrp">
<ul class="social-icons overlay-content">
<?php if(!empty($content['field_artist_facebook_link'])):?>
<li><a class="facebook" href="<?php print render($content['field_artist_facebook_link'][0]);?>"><i class="fa fa-facebook"></i></a></li>
<?php endif;?>
<?php if(!empty($content['field_artist_twitter_link'])):?>
<li><a class="twitter" href="<?php print render($content['field_artist_twitter_link'][0]);?>"><i class="fa fa-twitter"></i></a></li>
<?php endif;?>
<?php if(!empty($content['field_website_link'])):?>
<li><a class="gplus" href="<?php print render($content['field_website_link'][0]);?>"><i class="fa fa-google-plus"></i></a></li>
<?php endif;?>
</ul>
</div>
</div>
<div class="team-item team-member-info-wrp">
<div class="team-name">
<h5><?php print $title; ?></h5>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>