Highway 1 Discovery Route Widget Examples

Latest API Version date: 4/19/2017

Substantial update to event feed. Please remove all month/year calls in your code, as it is no longer needed unless you want to call a specific month/year. When calling a month/year, the date range field must read '0' to work. This is detailed in event section below. Leaving a year setting will result in rollover issues when moving from one year to the next, and past events will show up in your feed.

Re-instantiated month/year views for events. This is legacy behavior, and is not suggested; please use a single page with month-range setting to avoid having to manually update year data on month-only pages.

Note: we've received questions about the appearance of the feed output. It is subject to standard CSS rules, and can be modified as such within your CSS style sheets. Please contact us via the website if you would like assistance.

To implement:

1.) Include the following javascript file in the <head> of your template file:

<script src="http://api.highway1discoveryroute.com/widget/hwy1-api.js" type="text/javascript"></script>

2.) Add the following code per widget you are adding.

<div id="wcc-play-widget" class="wcc-widget-loading">
   <regions id="wcc-play-regions" value="10" /><br />
   <count id="wcc-play-count" value="5" /><br />
   <count id="wcc-play-order" value="random" />


<div id="example-content">
   <div id="wcc-play-widget-content"></div>

3.) Replace category with (play, eat, stay)

4.) Add a comma separated list of regions you would like to display content for. See list of region codes below.

Region Codes

Event Include code and Options:

Events can be filtered by region and category, and can show events up to a specific number of months from current.
<div id="wcc-event-widget-content" class="wcc-widget-content"></div>
<div id="wcc-event-widget" class="wcc-event-loading">
Enter region code(s) from list above, but note the following -
The event feed allows you to include multiple regions, but we have added region settings in the CMS that allow for an event to be flagged for multiple regions. That means that if an event is flagged for San Simeon and Cambria, you will see that event on Cambria's feed, even if you do not include San Simeon’s region code. We discourage using multiple event regions on a page, if only because you can get duplicate event posts, but also because it allows us to have a single point of update; we change the settings on the event in the CMS, and the changes appear globally; it also allows us to send events to areas that normally wouldn’t see them if so desired.
<regions id="wcc-event-regions" value="1,5" />
Determine number of events per page:
<count id="wcc-event-count" value="15"></count>
Month range determines how many months from current month will be displayed. For example, if it is March, and you want to show events through July, place a 4 in the value field. In April, events will display through August, etc. :
<count id="wcc-event-month-range" value="4"></count>
Events can still be displayed by month and/or year. To do so, assign a year and/or month. IMPORTANT: set month-range value to '0'.
<count id="wcc-event-month-range" value=""></count>
<count id="wcc-event-year" value="2017"></count>
<count id="wcc-event-month" value="04"></count>
<count id="wcc-event-month-range" value="0"></count>
Events are now assigned a category. Like regions, the event list can contain multiple categories, separated by a comma. The Category codes are listed below. :
<count id="wcc-event-category" value="8"></count>
Code block:
<div id="wcc-event-widget-content" class="wcc-widget-content"></div>
<div id="wcc-event-widget" class="wcc-event-loading">

<regions id="wcc-event-regions" value="" />
<count id="wcc-event-count" value=""></count>
<count id="wcc-event-month-range" value=""></count>
<count id="wcc-event-category" value=""></count>


Event Categories: