Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Events navigation, calendar widget

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1038 Views
  • karibe
    Community Member
    56 Posts

    Events navigation, calendar widget Link to this post


    I'm trying to do CalendarWidget. Main problem is how to make weeks partition?

    In CalendarWidget.ss it should look like this:

    <% control Weeks %>
    <% control Days %>
    <td class="$Event">$Day</td>
    <% end_control %>
    <% end_control %>

    And main problem is how to make proper dataModel?

    I'm trying to do that by:

    $output = new DataObjectSet();
    for ( $week =1 ; $week >= 5 ; $week++ )
    $output->push( new DataObjectSet( ), "Weeks" );

    foreach( $output as $objWeek )
    $objWeek->push( new ArrayData( array( /* needed data */ ) ) );

    It doesn't work:( output is empty.

    How to made proper data structure for easy template operations?

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.