Main page events under calendar limited to 2 events
authorLaury GvR <laury@gaslightmedia.com>
Mon, 21 Jul 2014 18:19:05 +0000 (14:19 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Mon, 21 Jul 2014 18:19:05 +0000 (14:19 -0400)
The events under the calendar on the main page are now limited to only showing
two events. Currently using PHP to achieve this, but will try to switch to
flexy.

templates/template.html

index d64b47f..3ffaefc 100755 (executable)
                                 <div id="cEventMore"><a href="{baseURLDefined:h}calendars-10/">More Events</a></div>
                                 <div id="eventCalendarWrapper">{smallCal:h}</div>
                                 <div id="eventItemWrapper">
+                                    <?php $counter = 0; ?>
                                     <a flexy:foreach="events,v" href="{v[href]:h}" class="cEventItem">
+                                        <?php $counter +=1;
+                                            if ($counter <=2) {
+                                        ?>
                                         <span class="cEventTitle">{v[header]}</span>
                                         <span class="cEventDate">{v[dates]}</span>
                                         <span class="cEventTimes" flexy:if="v[times]">{v[times]}</span>
@@ -94,6 +98,8 @@
                                             {v[loc][city]}, {v[loc][state]} {v[loc][zip]}
                                             {end:}
                                         </span> -->
+                                        
+                                        <?php }; ?>
                                     </a><!-- /.cEventItem -->
                                     <a href="{baseURLDefined:h}calendars-10/">More Events</a>
                                 </div><!-- /#eventItemWrapper -->