I'm creating a calendar with REST API calls....
Hello!
I have a section of my LIthium community dedicated to Events.
I have 4 categories: Americas Events, APJ Events, EMEA Events, and Virtual Events.
Each new Event is a new board within its respective region category (e.g. Las Vegas Conference March 2012 is a board in Americas Events).
To maintain the health of the community, boards are only created 2-4 weeks before an event and are quickly moved into a Read Only "Past Events" category 2 weeks after the event.
I want to create a custom content calendar for the 10 most upcoming events. This is how I imagine the pseudocode for a 3 event calendar:
______________________
variable: event1 = [BOARD ID]
variable: location1 = [Location text string]
variable: date1 = [Date text string]
variable: detail1 = [Web address text string]
variable: event2 = [BOARD ID]
variable: location2 = [Location text string]
variable: date2 = [Date text string]
variable: detail2 = [Web address text string]
variable: event3 = [BOARD ID]
variable: location3 = [Location text string]
variable: date3 = [Date text string]
variable: detail3 = [Web address text string]
<table>
<thead>
<tr>
<th>Date</th>
<th>Event</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr>
<td>date1</td>
<td><a href="[REST API href CODE USING event1]">[REST API BOARD TITLE CODE USING event1]</a> location1 <br/>
Latest Post - <a href="[REST API href CODE USING event1'S MOST RECENT POST]">[REST API RECENT POST TITLE CODE USING event1'S MOST RECENT POST]</a></td>
<td><a href="detail1" target="_blank">Details >></a></td>
</tr>
<tr>
<td>date2</td>
<td><a href="[REST API href CODE USING event2]">[REST API BOARD TITLE CODE USING event2]</a> location2 <br/>
Latest Post - <a href="[REST API href CODE USING event2'S MOST RECENT POST]">[REST API RECENT POST TITLE CODE USING event2'S MOST RECENT POST]</a></td>
<td><a href="detail2" target="_blank">Details >></a></td>
</tr>
<tr>
<td>date3</td>
<td><a href="[REST API href CODE USING event3]">[REST API BOARD TITLE CODE USING event3]</a> location3 <br/>
Latest Post - <a href="[REST API href CODE USING event3'S MOST RECENT POST]">[REST API RECENT POST TITLE CODE USING event3'S MOST RECENT POST]</a></td>
<td><a href="detail3" target="_blank">Details >></a></td>
</tr>
</tbody>
</table>
______________________
This is how I imagine the functionality:
- Admin creates the event board (e.g. San Jose Seminar December 2012), and puts it into the correct category (e.g. Americas Events)
- Admin copies all the relavent information into the variable fields (there will be a set number of variables), such as:
event1 = 932
location1 = in Las Vegas, NV
date1 = December 5, 2011
detail1 = http://www.seminars.com/LV2012
event2 = 476
location2 = in Orlando, FL
date2 = December 10-12, 2011
detail2 = http://www.conference.com/orlando
event3 = 870
location3 = in London, UK
date3 = January 4, 2012
detail3 = http://www.event.com/london12
And this is how I imagine the output:
______________________
Date | Event | Details |
December 5, 2011 | Las Vegas Seminar in Las Vegas, NV Latest Post - Re: Upcoming Agenda | Details >> |
December 10-12, 2011 | Florida Conference in Orlando, FL Latest Post - Nearby Hotels | Details >> |
January 4, 2012 | UK Event in London, UK Latest Post - Re: What are your travel plans? | Details >> |
______________________
What do you guys think? Doable? I'm hoping that I can use variables because this is custom content and I want the community admins to be able to update this whenever they need to.
Any code samples or advice would be greatly appreciated!!
Best,
Gianna