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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Preview: Event Calendar Module


Go to End


293 Posts   69241 Views

Avatar
Xeal

Community Member, 37 Posts

9 April 2009 at 8:10am

Now I have something else acting weird... haha you're going to love me after all this :P
Alright, now when I try to add Announcements, it acts as if it the announcement is saved, but nothing goes into the database nor the form itself (the cms). Not exactly sure why it's doing this. I tried looking through the code and still am, a little lost though, but I thought I'd post just in case someone else had this problem and knows how to fix it.

I Appreciate the hard work you put in to this module. keep up the good work =)

Avatar
UncleCheese

Forum Moderator, 4102 Posts

9 April 2009 at 8:16am

Should have been fixed in the latest revision. Can you make sure you're up to date?

Avatar
Victor

Community Member, 128 Posts

9 April 2009 at 8:21am

Tutorial: Extending Event_Calendar (wiki)

Missing in WorkshopHolder.ss

<% control Events %>

<% end_control %>

enveloping Image, Sponsor

Avatar
UncleCheese

Forum Moderator, 4102 Posts

9 April 2009 at 8:25am

I'm not sure what you're talking about?

Avatar
Xeal

Community Member, 37 Posts

9 April 2009 at 8:26am

in the WorkshopHolder The problem is the wiki doesn't explain it rather well.
there's a tag <% control Events %>
if you place it after that you can access the Image and Sponsor like this
ex. $Event->Image
$Event->Sponsor
look at line 52 I added it after this
<% control Event %>$Content.LimitWordCount(60)<% end_control %> <a href="$Link"><% _t('EVENTCALENDAR.MORE','more...') %></a>
Someone correct me if I'm way off but I'm pretty sure that's right, well it works for me =)
Hope that clears things a little for others who might be following the tutorial

Avatar
Xeal

Community Member, 37 Posts

9 April 2009 at 8:31am

To make a long story short. I extended the Calendar to make it work for my needs, but now I can't add any announcements to my calendar. Events work fine though, and on the Basic Calendar announcements work fine. I don't think I changed any code that could mess with the announcements, but I'll double check to make sure.

Attached Files
Avatar
UncleCheese

Forum Moderator, 4102 Posts

9 April 2009 at 8:31am

That is a confusing part of the Events control. It actually returns DateTime objects, so to access your Event properties, you need to do $Event.Property, e.g. $Event.Sponsor.

Victor, I hope you meant to write <% control Event %> and not <% control Events %>.. They return very different things in that context.

Avatar
Victor

Community Member, 128 Posts

9 April 2009 at 8:36am

Edited: 09/04/2009 8:38am


Victor, I hope you meant to write and not <% control Events %>.. They return very different things in that context.

I suspect that <% control Event %> is correct and <% control Events %> is not but the former does not work and the latter does :-)

But it envelopes $Event.Sponsor, not $Events.Sponsor. This is really confusing

Go to Top