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

event calendar upcoming events on your homepage


Go to End


4 Posts   1888 Views

Avatar
Georgesvdh

Community Member, 4 Posts

5 February 2010 at 4:47am

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

Forum Moderator, 4102 Posts

5 February 2010 at 5:54am

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

Avatar
Georgesvdh

Community Member, 4 Posts

5 March 2010 at 4:49am

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

Forum Moderator, 4102 Posts

5 March 2010 at 7:20am

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.