¿Cómo utilizar Coldfusoion MOD?

Tengo un código que toma eventos de FullCalendar.js que funciona bien.

Sin embargo, estoy teniendo dificultades para diseñarlo de manera que en cada columna, tenga dos eventos, se rompa y pase a la siguiente columna.

El código está escrito en coldfusion y leí que puedo usar MOD. Sin embargo, he intentado una declaración if y un contador para rastrear cuántos eventos hay y, sin embargo, no pasa a la siguiente columna

El siguiente es el código que estoy usando. Estoy tratando de apuntar a la sección "Más eventos" para que cuando llegue a dos eventos, se rompa y pase a la siguiente columna:

<!--- 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> The Content Collection/Feed &quot;<strong>#HTMLEditFormat(arguments.feedName)#</strong>&quot; does 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()) AND (ctr LT 6)">
                <cfset local.item = local.it.next() />
                <cfif not ListFind(local.listIDs, local.item.getValue('contentid'))>
                    <cfif ctr eq 1>
                    <!--- TODO: set a default image if no image is 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, and grouping is requested) --->
                                        <cfif YesNoFormat(arguments.groupDailyEvents)>
                                            <cfquery dbtype="query" name="subRS">
                                                select *
                                                from rs
                                                where 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 ALL 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 ALL EVENTS &gt;</small></button><br />
        </div><!---div bg-white1--->
        </cfoutput>
    </cfsavecontent>
    <cfreturn local.str />
</cffunction>

ACTUALIZAR Este es el código relevante que necesito ayuda para ajustar:

<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>

Cualquier ayuda sobre cómo usar MOD o un ejemplo sería genial.

Respuestas a la pregunta(0)

Su respuesta a la pregunta