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


Go to End
Reply


293 Posts   43443 Views

Avatar
Xeal

Community Member, 37 Posts

10 April 2009 at 3:08am

I've started playing around with SS recently, but I'll look into it and when I figure it out myself I'll let you know.

Avatar
UncleCheese

Forum Moderator, 4096 Posts

10 April 2009 at 3:15am

Did that latest revision work for you?

Avatar
Victor

Community Member, 128 Posts

10 April 2009 at 4:04am


function extendAnnouncement()
{
$this->removeAnnouncementField('Content');
$this->addAnnouncementField(new SimpleHTMLEditorField('Content'));
}

Will not work: Announcement is a property of WorkshopHolder, not of Workshop (from Calendar/not from CalendarEvent)

And there are other reasons to have seminars (we have 15-20 of them + 3-5 external, i.e. redirects) as WorkshopHolder and meetings as non-repeating events.

So, my question is: How to create WorkshopAll page which had WorkshopHolder pages as children and was listing their events?

Thanks

Victor

Avatar
UncleCheese

Forum Moderator, 4096 Posts

10 April 2009 at 5:03am

Of course it will work. The CalendarDateTime class has an abstract function extendAnnouncement() that you can use to add fields to the announcement popup. Did you try it? What error did you get? Be sure you're up to date on your SVN.

To make a Seminar holder you could do something as simple as:

class SeminarHolder extends Page
{
static $allowed_children = array('WorkshopHolder');
}

class SeminarHolder_Controller extends Page_Controller
{
}

SeminarHolder.ss

<% control Children %>
$Title
Upcoming Seminars
<% control upcomingEvents(5) %>
event info here
<% end_control %>
<% end_control %>

Avatar
Victor

Community Member, 128 Posts

10 April 2009 at 7:04am

No, I want SeminarHolder behaved exactly as WorkshopHolder, but with a twist: it displays events associated with its children.

So I took WorkshopHolder.php and copied it to SeminarHolder.php with obvious replacement

Then I took WorkshopHolder.ss and copied it to SeminarHolder.ss and enveloped <% if Events %>....<% end_if %>:

<% control children %><% if Events %>....<% end_if %><% end_control %>

However CalendarWidget on this page does not filter.

Victor

Avatar
UncleCheese

Forum Moderator, 4096 Posts

10 April 2009 at 7:11am

Right, because the start and end date parameters come in from the URL and that is parsed in the controller. Once you get into <% control Children %> you are not in the page controller anymore.

Avatar
Xeal

Community Member, 37 Posts

10 April 2009 at 8:30am

Works perfectly for me now thanks!

Avatar
UncleCheese

Forum Moderator, 4096 Posts

10 April 2009 at 8:34am

I've checked in the patch for the "ghost dates" bug.

Go to Top