4 Replies Latest reply on Aug 8, 2006 4:30 AM by Anderson11983

    display items based upon day of the week

    Anderson11983
      hi guys,

      i have a problem, i have been passed this code from a fellow developer who has gone away for 2 weeks and i need to fix this problem that has been identified. I have to display events based upon the days of a week.

      I mean that every monday an event should be displayed. The code below only displays the item for the current week,and once the day has passed the event item disappears from menu.

      appreciate any and all help guys

      andy
      ::CODE::

      <cfsavecontent variable="sWeekly">
      <cfoutput>
      <cfloop index="n" from="0" to="6">
      <cfset dSomeDay = dateAdd("d",n,dThisWeekStart)>
      <tr valign="top">
      <p class="event-date">#dateformat(dSomeDay,"dddd")#s</p>
      <cfif structKeyExists(structEvents,dSomeDay)>
      <cfloop index="j" list="#structEvents[dSomeDay]#">
      <cfif getThisWeek.iEventTypeID[j] eq 2>
      <p class="event-link"><a href="#cffuncthisurl('event','event')##getThisWeek.iEventID[j]#"><img src="/Nimoi/sites/Brannigans/images/arrow.gif" /> #getThisWeek.sTitle[j]#</a></p>
      </cfif>
      </cfloop>
      </cfif>
      </cfloop>
      </cfoutput>
      </cfsavecontent>
      ::/CODE::