10987 Posts in 2724 Topics by 1817 members
|Go to End|
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
5 February 2010 at 5:54am
<% control UpcomingEvents %>
$Event.Title $_Dates $Event.Link, etc..
<% end_control %>
5 March 2010 at 4:49am
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
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.
|Go to Top|