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.

All other Modules

Discuss all other Modules here.

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

Preview: Event Calendar Module


Reply

293 Posts   41903 Views

Avatar
UncleCheese

9 April 2009 at 8:43am 4085 Posts

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 %> ?

Avatar
Xeal

9 April 2009 at 8:46am Community Member, 37 Posts

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.

Avatar
Victor

9 April 2009 at 8:48am Community Member, 128 Posts

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 %>

Avatar
UncleCheese

9 April 2009 at 8:50am 4085 Posts

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. :)

Avatar
Xeal

9 April 2009 at 8:54am (Last edited: 9 April 2009 9:07am), Community Member, 37 Posts

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 =)

Avatar
Victor

9 April 2009 at 9:53am Community Member, 128 Posts

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

Avatar
UncleCheese

9 April 2009 at 12:11pm 4085 Posts

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

Avatar
UncleCheese

9 April 2009 at 12:15pm 4085 Posts

Victor,

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

Attached Files