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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Calendar


Go to End


16 Posts   2393 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

18 October 2009 at 10:49am

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

Community Member, 8 Posts

4 December 2009 at 7:52am

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

Forum Moderator, 4102 Posts

4 December 2009 at 8:21am

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

Community Member, 8 Posts

4 December 2009 at 8:41am

Edited: 04/12/2009 8:46am

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

Forum Moderator, 4102 Posts

4 December 2009 at 8:47am

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

Forum Moderator, 4102 Posts

4 December 2009 at 8:47am

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

Community Member, 8 Posts

4 December 2009 at 8:57am

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

Forum Moderator, 4102 Posts

4 December 2009 at 9:18am

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.

Go to Top