Jump to:

10845 Posts in 2513 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Calendar

Discuss all other Modules here.

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

Page: 1 2
Go to End
Author Topic: 1391 Views
  • UncleCheese
    Avatar
    4085 Posts

    Re: Calendar Link to this post

    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.

  • richard123
    Avatar
    Community Member
    8 Posts

    Re: Calendar Link to this post

    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.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Calendar Link to this post

    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.

  • richard123
    Avatar
    Community Member
    8 Posts

    Re: Calendar Link to this post

    Hi..

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

    I mean the site menu or site navigation.
    Thanks.

    Attached Files
  • UncleCheese
    Avatar
    4085 Posts

    Re: Calendar Link to this post

    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.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Calendar Link to this post

    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.

  • richard123
    Avatar
    Community Member
    8 Posts

    Re: Calendar Link to this post

    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!

  • UncleCheese
    Avatar
    4085 Posts

    Re: Calendar Link to this post

    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.

    1391 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.