list results in rotating view
13 posts by 2 authors in: Forums > CMS Builder
Last Post: September 26, 2013 (RSS)
Hi Jason
Still the same issue - see http://www.stpaulsburwood.org.au/home3.php - it's not recognising the 2nd column, which was the issue from the outset, ie, <div class="one-half last-col blog-event-one-half"> which is the "2nd column". Any other suggestions?
By Jason - September 26, 2013
Hi,
This is still an issue with the divs. What it looks like is that we need to move the clearfix div outside of the foreach loop so that it wraps around each group of 2. Try this:
<?php
$eventsPerSlide = 2;
$eventCount = 0;
?>
<div class="text-slider">
<ul class="slides">
<li>
<div class="clearfix">
<?php foreach ($eventsRecords as $record): ?>
<div class="one-half">
<div class="event-preview">
<div class="event-date-wrapper">
<div class="event-month"><?php echo $record['month'] ?></div>
<div class="event-day"><?php echo $record['day'] ?></div>
</div>
<div class="event-entry-inner">
<h4><a href="<?php echo $record['_link'] ?>"><?php echo htmlencode($record['title']) ?></a> <span>Event Time: <i><?php echo htmlencode($record['event_time']) ?></i> / Event Location: <i><?php echo htmlencode($record['event_location']) ?></i></span></h4>
<p><?php echo htmlencode($record['brief_event_summary']) ?></p>
</div>
</div>
</div>
</div>
<?php if (++$eventCount % $eventsPerSlide == 0): ?>
</div>
</li>
<li>
<div class = "clearfix">
<?php endif ?>
<?php endforeach ?>
</div>
</li>
</ul>
</div>
Hope this helps
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Hi Jason
No, that doesn't fix it either. See http://www.stpaulsburwood.org.au/home3.php
I think perhaps I'll have to ditch this option as the listing doesn't appear to work with style (such a shame!)
Thanks