Jump to:

10928 Posts in 2612 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » Event Calendar - Added field not showing up?

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 879 Views
  • otherjohn
    Avatar
    Community Member
    125 Posts

    Event Calendar - Added field not showing up? Link to this post

    Hi, I added one field to the CalendarEvents.php which is "Summary".
    ind the DB array I put 'Summary' => 'Varchar(255)',
    and in the getCMSFields I put $f->addFieldToTab("Root.Content.Main", new TextField("Summary","One Line Summary"), "Content");

    But in my CalendarEvents.ss file I have $Summary and nothing is showing up.
    I entered text in the admin for it.

    Any idea?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Event Calendar - Added field not showing up? Link to this post

    The Events() control, despite the misleading name, actually returns CalendarDateTime objects, because Events can have many dates. You need to use the $Event accessor.. $Event.Summary

    This is all in the docs under "extending event calendar"..

  • otherjohn
    Avatar
    Community Member
    125 Posts

    Re: Event Calendar - Added field not showing up? Link to this post

    Ahh, thanks
    working now. I had tride $Events.Summary and $Summary but not $Event.Summary

    879 Views
Page: 1
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.