coldfusion - How to use Coldfusoion MOD? -


i have code grabs events fullcalendar.js works fine.

however, having hard time style in way in each column, has 2 events, breaks , goes next column.

the code written in coldfusion , read can use mod. however, have tried if statement , counter track how many events , yet not go next column

the following code using. trying target "more event" section when hits 2 events, breaks , goes next column:

<!--- derived from: ---> <!--- https://gist.github.com/stevewithington/18a6ef38e7234f1e1fc3 ---> <!--- upcoming events ---> <cffunction name="dspdisplayevents">     <cfargument name="feedname" type="string" default="8c702325-155d-0201-11d851267d5b4b2b" />     <cfargument name="maxmonths" type="numeric" default="3" />     <cfargument name="groupdailyevents" default="true" />     <cfscript>         var rs = '';         var subrs = '';         var local = {};         local.feed = variables.$.getbean('feed').loadby(name=arguments.feedname).setmaxitems(0).setnextn(0);         local.listids = '';          /*if ( feed.getisnew() ) {             return '<div class="alert alert-info"><strong>ooops!</strong> content collection/feed &quot;<strong>#htmleditformat(arguments.feedname)#</strong>&quot; not exist.</div>';         }*/          local.it = feed.getiterator(             from=now()             , to=dateadd('m', val(3), now())             , maxitems=3         );     rs = local.it.getquery();      </cfscript>     <cfsavecontent variable="local.str">         <cfoutput>             <!--- #feed.getisnew()# --->             <!--- #local.it.hasnext()# --->             <cfset ctr= 1 />             <cfloop condition="(local.it.hasnext()) , (ctr lt 6)">                 <cfset local.item = local.it.next() />                 <cfif not listfind(local.listids, local.item.getvalue('contentid'))>                     <cfif ctr eq 1>                     <!--- todo: set default image if no image available --->                     <div class="bg-white1 centerevent">                          <div class="hidden-xs col-md-2 override-col-md-offset-3 margin-left">                             <p class="image-center upcoming-events-image image-padding"><img src="#local.item.getimageurl()#" alt="#htmleditformat(local.item.gettitle())#"> </p>                         </div>                         <div class="col-xs-offset-1 col-xs-10 col-md-offset-0 col-md-2" id="featured-event">                             <div class="eventcenter">                                    <h4 class="featured1"><strong>featured event</strong></h4>                                 <hr class="hr" />                             </div>                             <div class="eventtop">                                   <small>                                     <!--- date --->                                     <!--- start date --->                                     #lsdateformat(local.item.getvalue('displaystart'))#                                         <!--- end date (if 'daily' event, , grouping requested) --->                                         <cfif yesnoformat(arguments.groupdailyevents)>                                             <cfquery dbtype="query" name="subrs">                                                 select *                                                 rs                                                 rs.contentid = <cfqueryparam value="#local.item.getvalue('contentid')#" />                                             </cfquery>                                             <cfif subrs.recordcount gt 1>                                                 <!--- end date --->                                                 <cfset enddate = listlast(valuelist(subrs.displaystop)) />                                                 <cfif isvalid('date', enddate)>                                                     - #lsdateformat(enddate)#                                                 </cfif>                                             </cfif>                                             <cfset local.listids = listappend(local.listids, local.item.getvalue('contentid')) />                                         </cfif>                                 </small>                                 <h6 class="ellipsis h6size"><!--- title --->                                     <a href="#local.item.geturl()#">                                         <div class="featured-event-title">                                             #htmleditformat(local.item.getvalue('title'))#                                         </div>                                     </a>                                 </h6>                                 <div>                                     <small>                                         <!--- summary --->                                         <div class="featured-event-summary">                                             <cfif len(local.item.getvalue('summary'))>                                                 #local.item.getvalue('summary')#                                             </cfif>                                         </div>                                     </small>                                 </div>                                 <a href="##"><small>learn more &gt;</small></a>                                 <br />                             </div>                         </div><!---eventtop div--->                         <cfelse>                             <cfif ctr eq 2>                         **<div class="col-xs-offset-1 col-xs-10 col-md-offset-0 col-md-2 <!---eventbox--->" id="more-events">                                 <small><strong class="featured morecenter">more events</strong></small><br />                             </cfif>                             <div class="eventsize eventdiv" style="border: 1px solid black;">                                      <small>#lsdateformat(local.item.getvalue('displaystart'))#</small><br />                                     <small><strong>#htmleditformat(local.item.getvalue('title'))#</strong></small><br />                             </div>                                 <br />                     </cfif>                 </cfif>                 <cfset ctr++ />             </cfloop>**             <!--- <button class="btn btn-info btn-md resizable" type="button" onclick="parent.location='http://oc2-web03/mura-6.2.6407/index.cfm/news-events/events-calendar/'" ><small>see events &gt;</small></button> --->             </div>             <button class="btn btn-info btn-md resizable buttonhome" type="button" onclick="parent.location='http://oc2-web03/regal_prod/index.cfm/news-events/events-calendar/'" ><small>see events &gt;</small></button><br />         </div><!---div bg-white1--->         </cfoutput>     </cfsavecontent>     <cfreturn local.str /> </cffunction> 

update relevant code need adjust:

<div class="col-xs-offset-1 col-xs-10 col-md-offset-0 col-md-2 <!---eventbox--->" id="more-events">                                     <small><strong class="featured morecenter">more events</strong></small><br />                                 </cfif>                                 <div class="eventsize eventdiv" style="border: 1px solid black;">                                          <small>#lsdateformat(local.item.getvalue('displaystart'))#</small><br />                                         <small><strong>#htmleditformat(local.item.getvalue('title'))#</strong></small><br />                                 </div>                                     <br />                         </cfif>                     </cfif>                     <cfset ctr++ />                 </cfloop> 

any on how use mod or example great.


Comments