I have a list of about 60 events. This list is in one HTML file. I want to have a 'Forthcoming Events' list displayed on every page of my website, showing three forthcoming events from my list of 60 at a time. I want the events shown in the Forthcoming list to automatically update itself so that only forthcoming events are ever shown.
My full list of 60 is marked up in one HTML file, using a TABLE. In the code, the events start after the TBODY tag. Each event has its own table row (TR). It begins like this:
Code:
<table class="events">
<thead>
<tr>
<th id="event-date">Date</th>
<th id="event-title">Title</th>
</tr>
</thead>
<tbody>
<tr class="vevent event-performance">
<th headers="event-date"><abbr class="dtstart" title="2009-10-01T2000+0100">01 Oct 2009</abbr></th>
<td headers="event-title" class="summary"><a href="/events/2009/first-event.html" rel="bookmark">First Event</a></td>
</tr>
<tr class="vevent event-radio">
<th headers="event-date"><abbr class="dtstart" title="2009-10-02T1000+0100">02 Oct 2009</abbr></th>
<td headers="event-title" class="summary"><a href="/events/2009/second-event.html" rel="bookmark">Second Event</a></td>
</tr>
....
I am a complete PHP novice! Would anyone know how I could grab three forthcoming events at a time from this list, and output those three in EXACTLY the same code as shown above to all the pages of my website?
I realise that I would need to produce a 'forthcoming events' template and include that in my web pages. I just don't know how to produce that template!
Any help or pointers would be much appreciated!
Last edited by bristols; 10-01-2009 at 11:23 AM..
|