Is have installed Drupal 6.10 and created a calendar using CCK, Dates, and Calendar. Now I need to incorporate an "Upcoming Events" block on my front page to display the next "x" events, or the events for the next "x" days. I have browsed the forums with no clear-cut answer.

Where may I find a correct recipe for creating an "Upcoming Events" block for my front page?

Thanks,
CH

Comments

einsteinsboi’s picture

Not too sure, but I think this screencast might be of some help, or at least point you in the right direction

http://drupaltherapy.com/node/76

charleyhankins’s picture

Thanks. That's where I got my recipe for my calendar. It's up and working fine. And Sean is a great teacher.

However, I still don't have a correct recipe for creating an "Upcoming Calendar Dates or Events" block showing the next "x" number of events. Anyone know a direction to point me in? I'm certain I'm not the first to inquire.

Thanks,
CH

stanb’s picture

You can display the Upcoming Events as a block on the front page by editing the View you created for the Calendar. Here's how I did it. In the Calendar view, you should see a links for
* Defaults
* Calendar page
* Calendar block
* Year view
* Month view
* Day view
* Week view
* Block view
* Upcoming

Select Upcoming. Under Filters, you want the following:

Node: Published Yes
Date: Date Content: DateTime - (field_datetime) - From date >= now
Node: Type = Event

You can control how the output looks by adding the fields you want displayed under Fields.
e.g.,

Node: Title
Content: - From date Default

Under Basic Settings, you probably want to set the Style to HTML List but you could have a calendar view instead...it's up to you.

Hope this helps.

Stan B

charleyhankins’s picture

Thanks so much for your input.

I have followed your example, but it keeps coming up as a monthly calendar grid.

Basic settings
Name: Defaults
Title: Calendar
Change settings for this styleStyle: HTML List
Change settings for this styleRow style: Fields
Use AJAX: No
Use pager: No
Items to display: Unlimited
More link: No
Distinct: No
Access: Unrestricted
Exposed form in block: No
Header: None
Footer: None
Empty text: None
Theme: Information

Any ideas?

Thanks,
CH

weblance’s picture

Basic settings
Name: Upcoming Shows
Title: Calender
Change settings for this styleStyle: HTML List
Change settings for this styleRow style: Fields
Use AJAX: No
Use pager: No
Items to display: 3
More link: Yes
Distinct: Yes
Access: Unrestricted
Caching: None
Link display: Calendar page
Exposed form in block: No
Header: None
Footer: None
Empty text: None
Theme: Information

seehui’s picture

I have my view as below, but two duplicate events still appear although they are the same node.

Name: Defaults
Title: UPCOMING EVENTS
Change settings for this styleStyle: HTML List
Change settings for this styleRow style: Fields
Use AJAX: No
Use pager: No
Items to display: 10
More link: No
Distinct: Yes
Access: Unrestricted
Caching: None
Exposed form in block: No
Header: None
Footer: Full HTML
Empty text: None
Theme: Information

vm’s picture

issues already in views.module issue queue. What you are seeing may be a bug in core based on my quick read. However, there may be a work around or two.

vitis’s picture

This is another issue - I shouldn't put it here.

rgoldman’s picture

Hi all,

I am super new to Drupal so every help will be greatly appreciated. I put my calendar up and also set a block ro show the next event on my calendar. It worked great but only for one day. The next day it disapeard and didn't show up until I added a new event to my calendar.

Any ideas on how to fix this?

Thanks!

vitis’s picture

These are my settings for views > calendar > new block = upcoming for my Upcoming events calendar, which works fine. Hope this helps someone. Maybe look into cache or filters or sort for how views chooses the date.

Basic settings
Name: Upcoming Events
Title: Upcoming Events
Change settings for this styleStyle: HTML List
Change settings for this styleRow style: Fields
Use AJAX: No
Use pager: No
Items to display: 5
More link: Yes
Distinct: No
Access: Unrestricted
Caching: None
Exposed form in block: No
Header: None
Footer: None
Empty text: None
Theme: Information
Fields
Node: Title
Node: Updated date  (not displayed)
Content: Date and - From date Day Only - Long (created in Date)
Content: Date and - From date Hours Only (created in Date)
Content: Attention Default (my teaser field)
Block settings
Admin: Upcoming
Caching: Do not cache
 Sort criteria
Content: Date and - From date asc
 Filters
Node: Published Yes
Settings
Date: Date (node) Content: Date and Time (field_date_example) - From date >= now
gcybill’s picture

hmm.. it's just me or my Date and Time couldn't be filtered From date >= now.

The "Content: Date and Time - From date" just not exist in the Filter section. Please help.

TribalDancer’s picture

This video is the recipe I used, and it worked great for the Upcoming Events block that is generated by calendar in Views.

http://geeksandgod.com/tutorials/computers/cms/drupal/creating-upcoming-...

Then you could simply put the block on your front page and be set up.

submit.dk’s picture

Very usefull link TribalDancer. Thanks a lot!

/Kenneth
www.submit.dk/drupal

twseid58’s picture

The video linked here helped me solve my problem. Thank you.