Jump to:

10845 Posts in 2513 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Preview: Event Calendar Module

Discuss all other Modules here.

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

Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
Go to End
Author Topic: 39245 Views
  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: Event Calendar Module Link to this post

    It is confusing.. I tried to make that very clear in the tutorial.

    "Remember, the Events control returns CalendarDateTime objects, so we need to refer to the $Event accessor to get to those fields."

    So what you're saying is that when you saw this:

    <div class="workshop-image">
    <% control Event.Image %>
    <% control CroppedImage(100,100) %>
    <img src="$URL" alt="" />
    <% end_control %>
    <% end_control %>
    </div>
    <dl>
    <dt>Category: </dt>
    <dd>$Event.Category</dd>
    <dt>Sponsor: </dt>
    <dd>$Event.Sponsor</dd>
    </dl>

    It wasn't apparent to you that you were still in the <% control Events %> ?

  • Xeal
    Avatar
    Community Member
    37 Posts

    Re: Preview: Event Calendar Module Link to this post

    UncleCheese I'm assuming this is where people get confused.

    Now, somewhere below the content, we need to add some of the custom Workshop fields we created. Remember, the Events control returns CalendarDateTime objects, so we need to refer to the $Event accessor to get to those fields.

    This is not entirely true because directly under $content we're not in the Events control yet. You have to go a little further to get into the Events, which is probably where people get confused.

  • Victor
    Avatar
    Community Member
    128 Posts

    Re: Preview: Event Calendar Module Link to this post

    UC, you wrote "After $Content" but there are two instances of $Content, I used the first one, but only the second is in <% control Events %>

  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: Event Calendar Module Link to this post

    Thanks for clearing that up, guys. I definitely see the issue. It's funny that documentation needs beta testers the same way the actual software itself does.

  • Xeal
    Avatar
    Community Member
    37 Posts

    Re: Preview: Event Calendar Module Link to this post

    haha.. Yeah it is strange how there's a need for people to test all aspects of a program or in this case module, but either way it's good to have people, who can find different errors. Makes it a lot faster to debug that way =)

  • Victor
    Avatar
    Community Member
    128 Posts

    Re: Preview: Event Calendar Module Link to this post

    I continued with tutorial. Created WorkshopDateTime.php and edited it and Workshop.php
    However table has field and title Location, but PopUp does not. Probably one more php file needs to edited?

    Victor

  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: Event Calendar Module Link to this post

    Did you follow the instructions on using the addPopupFields() method?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Preview: Event Calendar Module Link to this post

    Victor,

    I've attached the three files created in the tutorial to help you out.

    Attached Files
    39245 Views
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
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.