How do I publish web content events?

Web Content events can be published either as an iCal file or via the Calendar data API.


Publishing via the Calendar data API:

A typical ATOM entry that represents a standard all-day event might look something like this:

<entry>

<title type="text">Independence Day</title>
<gd:when startTime="2006-07-04" endTime="2006-07-05" />

</entry>


This would create an event called "Independence Day" on July 4th. If you wanted to add web content to this event, you could change it as follows (added fields are in green boldface):

<entry>

<title type="text">No work today!</title>
<gd:when startTime="2006-07-04" endTime="2006-07-05" />

<atom:link rel="http://schemas.google.com/gCal/2005/webContent"
           title="Independence Day"
           href="http://www.google.com/calendar/images/google-holiday.gif" 
           type="image/gif">
   <gCal:webContent url="http://www.google.com/logos/july4th06.gif"
                    width="276"
                    height="120" />
</atom:link>

</entry>


These fields tell Google Calendar to display this event specially and where to find the additional web content associated with the event. The details for each of these fields is described below. You can set these fields using the Google Calendar data API.


  • <atom:link rel="http://schemas.google.com/gCal/2005/webContent"
    • title (required): Specifies the title of the event that appears in the header of the pop-up window and the tooltip that appears when hovering over the icon.
    • href (required): Specifies the icon that should be displayed at the top of each day. Icons may be in any image format that can be displayed in a web browser. The image will be scaled to display at 16x16.
    • type: Specifies the type of the content. Allowed values include text/html or image/*. This field is required if a CONTENT-URL is specified. If text/html is used, the content will be displayed in an IFRAME; if image/* is used, the content will be displayed in an IMG element.
  • <gCal:webContent
    • url: A link to the content to display in the pop-up window. You can link to an HTML file or image as long as you properly set the type attribute above.
    • width: Specifies the width (in pixels) of the IFRAME or IMG element.
    • height: Specifies the height (in pixels) of the IFRAME or IMG element.


Publishing using an iCal file:

A typical iCal file that represents a standard all-day event might look something like this:

BEGIN:VEVENT
DTSTART;VALUE=DATE:20060704
DTEND;VALUE=DATE:20060705
SUMMARY:Independence Day
END:VEVENT

This would create an all-day event called "Independence Day" on July 4.

If you wanted to add web content to this event, you just need to add a few additional fields to the event description in iCal (the added fields are in green boldface):

BEGIN:VEVENT
DTSTART;VALUE=DATE:20060704
DTEND;VALUE=DATE:20060705
SUMMARY:Independence Day
X-GOOGLE-CALENDAR-CONTENT-TITLE:Independence Day
X-GOOGLE-CALENDAR-CONTENT-ICON:http://www.google.com/calendar/images/google-holiday.gif
X-GOOGLE-CALENDAR-CONTENT-URL:http://www.google.com/logos/july4th06.gif
X-GOOGLE-CALENDAR-CONTENT-TYPE:image/gif
X-GOOGLE-CALENDAR-CONTENT-WIDTH:276
X-GOOGLE-CALENDAR-CONTENT-HEIGHT:120
END:VEVENT


These fields tell Google Calendar to display this event specially and where to find the additional web content associated with the event. The details for each of these fields are described below:

  • X-GOOGLE-CALENDAR-CONTENT-TITLE (required): Specifies the title of the event that appears in the header of the pop-up window and the tooltip that appears when hovering over the icon.
  • X-GOOGLE-CALENDAR-CONTENT-ICON (required): Specifies the icon that should be displayed at the top of each day. Icons may be in any image format that can be displayed in a web browser. The image will be scaled to display at 16x16.
  • X-GOOGLE-CALENDAR-CONTENT-URL: A link to the content to display in the pop-up window. You can link to an HTML file or image, as long as you properly set X-GOOGLE-CALENDAR-CONTENT-TYPE.
  • X-GOOGLE-CALENDAR-CONTENT-TYPE: Specifies the type of the content. Allowed values include text/html or image/*. This field is required if a CONTENT-URL is specified. If text/html is used, then the content will be displayed in an IFRAME; if image/* is used, then the content will be displayed in an IMG element.
  • X-GOOGLE-CALENDAR-CONTENT-WIDTH: Specifies the width (in pixels) of the IFRAME or IMG element.
  • X-GOOGLE-CALENDAR-CONTENT-HEIGHT: Specifies the height (in pixels) of the IFRAME or IMG element.

Main menu
7896264476815777167
true
Search Help Center
true
true
true
false
false