• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

display items based upon day of the week

Guest
Aug 08, 2006 Aug 08, 2006

Copy link to clipboard

Copied

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 eq 2>
<p class="event-link"><a href="#cffuncthisurl('event','event')##getThisWeek.iEventID#"><img src="/Nimoi/sites/Brannigans/images/arrow.gif" /> #getThisWeek.sTitle#</a></p>
</cfif>
</cfloop>
</cfif>
</cfloop>
</cfoutput>
</cfsavecontent>
::/CODE::
TOPICS
Advanced techniques

Views

300

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 08, 2006 Aug 08, 2006

Copy link to clipboard

Copied

Andy,

Whats the problem with this code? What you want to fix? Sorry I'm not able to figure out! Please explain.

Cheers / Manu.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 08, 2006 Aug 08, 2006

Copy link to clipboard

Copied

hi wmanu
thanks for the reply - the problem that i am having is that, that code displays events for a venue - however when the date that a event day has passed the event disappears from the page - these are weekly events and should be displayed on the same day of each week.

sorry if it sounds a little confusing.

Hope this helps a little more

andy

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 08, 2006 Aug 08, 2006

Copy link to clipboard

Copied

hi wmanu
thanks for the reply - the problem that i am having is that, that code displays events for a venue - however when the date that a event day has passed the event disappears from the page - these are weekly events and should be displayed on the same day of each week.

sorry if it sounds a little confusing.

Hope this helps a little more

andy

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 08, 2006 Aug 08, 2006

Copy link to clipboard

Copied

LATEST
hi wmanu
thanks for the reply - the problem that i am having is that, that code displays events for a venue - however when the date that a event day has passed the event disappears from the page - these are weekly events and should be displayed on the same day of each week.

sorry if it sounds a little confusing.

Hope this helps a little more

andy

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation