Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Calendar


Reply

16 Posts   1506 Views

Avatar
UncleCheese

18 October 2009 at 10:49am 4085 Posts

Try some of the fixes in this post and let me know how you make out.

http://www.silverstripe.org/dataobjectmanager-module-forum/show/268609#post268609

I can't replicate the issue on any of my installs.

Avatar
richard123

4 December 2009 at 7:52am Community Member, 8 Posts

Hi Uncle Cheese..

The calendar is working now.
Did an update on all the modules.

One question - The events do not show up on the calendars page by default.
Is this default behavior?

I don't want to check the 'Show in Menus' on the config since I only like
to see the events on the Calendar page, not on the main menu on the whole site..

Maybe I missed something?

Thanks.

Avatar
UncleCheese

4 December 2009 at 8:21am 4085 Posts

By default the calendar should show you the next X number of upcoming events, as defined in the configuration tab in "number of default events to display."

I'm not sure what you mean about the menu. I usually don't build my menu to show the children of a Calendar.

Avatar
richard123

4 December 2009 at 8:41am (Last edited: 4 December 2009 8:46am), Community Member, 8 Posts

Hi..

Please see attached the screenshot.
If checked, it shows the event.

I mean the site menu or site navigation.
Thanks.

Attached Files
Avatar
UncleCheese

4 December 2009 at 8:47am 4085 Posts

It sounds like you need to build your menu differently. It's not good practice to just show the children of every top level page because that list may get very long, as you've seen in the calendar. I usually only show children for certain page types that I know will have a small number of children.

You can even put a flag on your Page class for "show children".. but it just depends on the project.

Avatar
UncleCheese

4 December 2009 at 8:47am 4085 Posts

It sounds like you need to build your menu differently. It's not good practice to just show the children of every top level page because that list may get very long, as you've seen in the calendar. I usually only show children for certain page types that I know will have a small number of children.

You can even put a flag on your Page class for "show children".. but it just depends on the project.

Avatar
richard123

4 December 2009 at 8:57am Community Member, 8 Posts

Thanks for the info.

So it means the calendar module works fine.
I just need to modify the menu code.

Thanks for the quick help!

Avatar
UncleCheese

4 December 2009 at 9:18am 4085 Posts

Yeah, it's just a little assuming to leave that unchecked by default. Everyone's project is different, and I don't know if I would want to burden users with having to check something that's normally checked for them. If you do want to change that setting, however, you can set 'ShowInMenus' => 0 using the Object::addStaticVars() method to add a $defaults array to the CalendarEvent class.