/ Published in: PHP
The template used for each sidebar record displayed. Contains a bunch of conditional to do different things based upon options set for each sidebar.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $callouts = $this->get_field('callouts'); $alignment = $this->get_field('title_align.name'); if($alignment == 'Left') { $alignment = 'left'; } elseif($alignment == 'Center') { $alignment = 'center'; } elseif($alignment == 'Right') { $alignment = 'right'; } else { } $callout_image = $this->get_field('callouts.image.guid'); if($this->get_field('display_highlight') == true) { } ?> <li id="{@slug}" class="widgetcontainer widget_{@slug} <?php echo $color; ?> <?php if($callouts !='') { ?>callout<?php } ?>"> <?php if($callouts !='') { ?> <?php foreach($callouts as $key => $callouts_array) { ?> <a href="<?php echo $callouts_array['link']; ?>"><img src="<?php echo $callout_image; ?>" alt="<?php echo $callouts_array['name']; ?>" /></a> <a href="<?php echo $callouts_array['link']; ?>"><?php echo $callouts_array['name']; ?></a> <?php } ?> <?php } else { ?> <?php if($this->get_field('display_title') == true) { ?> <?php if($this->get_field('title_link') != '') { ?> <div class="sidebar-top"></div> <div> <h3 class="widgettitle <?php echo $alignment; ?>"><a href="{@title_link}">{@name}</a></h3> {@content} </div> <div class="sidebar-bot"></div> <?php } else { ?> <div class="sidebar-top"></div> <div> <h3 class="widgettitle <?php echo $alignment; ?>">{@name}</h3> {@content} </div> <div class="sidebar-bot"></div> <?php } ?> <?php } else { ?> <div class="sidebar-top"></div> <div>{@content}</div> <div class="sidebar-bot"></div> <?php } ?> <?php } ?> </li>