Events Calendar items displayed limiting
authorLaury GvR <laury@gaslightmedia.com>
Tue, 29 Jul 2014 13:03:51 +0000 (09:03 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 29 Jul 2014 13:03:51 +0000 (09:03 -0400)
Now using flexy, not php, in template.html to limit the number of items
in existence, not just visible, on the events calendar as seen on the
homepage, to four.

templates/template.html

index 00b6a54..1910ea0 100755 (executable)
                                 <div id="eventCalendarWrapper">{smallCal:h}</div>
                                 <div id="eventItemWrapper">
                                     <?php $counter = 0; ?>
-                                    <a flexy:foreach="events,v" href="{v[href]:h}" class="cEventItem">
+                                    {foreach:events,v}
                                         <?php $counter +=1;
                                             if ($counter <=4) {
                                         ?>
+                                        <a href="{v[href]:h}" class="cEventItem">
+                                        
                                         <span class="cEventTitle">{v[header]}</span>
                                         <span class="cEventDate">{v[dates]}</span>
                                         <span class="cEventTimes" flexy:if="v[times]">{v[times]}</span>
-
+                                        </a><!-- /.cEventItem -->
                                         <?php }; ?>
-                                    </a><!-- /.cEventItem -->
+                                    
+                                    {end:}
                                     <a href="{baseURLDefined:h}calendars-10/">More Events</a>
                                 </div><!-- /#eventItemWrapper -->
                             </div><!-- /#homepage_events_wrapper -->