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

event calendar upcoming events on your homepage


Reply

4 Posts   1257 Views

Avatar
Georgesvdh

5 February 2010 at 4:47am Community Member, 4 Posts

hi to all of you ;-)

I am new to Silverstripe I am not a programer and I have a question on how to display upcoming events on my homepage.

the site I am building in silverstripe cms has a menu with in it a home button an events button and some more buttons. Under the events button is the event calendar with the upcoming events and calendar it all works great, but on my home page (home button) I want to show the just the upcoming events. I don't know how to do this.

could anybody show me how to do this or point me in the right direction I have been searching and reading the forums but cant find what to do exactly.

tnx in advance for your time
best regards Georges

Avatar
UncleCheese

5 February 2010 at 5:54am 4085 Posts

<% control UpcomingEvents %>
$Event.Title $_Dates $Event.Link, etc..
<% end_control %>

Avatar
Georgesvdh

5 March 2010 at 4:49am Community Member, 4 Posts

Hey UncleCheese

tnx for you reply but I don't know where to impute this?

I tried opening the page.ss in my template folder of my theme and imputing the code there, but that resolute in nothing. Than I tried imputing via the HTML editor in the silverstripe backend but that just displayed the code on my homepage it didn't give me the events.

sorry if its a stupid question ;-) very new to this cms not sure how it all works but figuring out step by step.

tnx in advanced for your time and answer

Georges

Avatar
UncleCheese

5 March 2010 at 7:20am 4085 Posts

It should be decorated into your SiteTree class, and should work on all SiteTree descendants. So if you're on Page.ss, provided you're not in another <% control %> block, you should be fine.

You may have an older version of EventCalendar. Make sure the file CalendarSiteTree.php is in you event_calendar/code folder.