If enabled, you can place the League Lab widget on your website by using an iFrame in any content block. You can also pre-filter the results of the widget by adjusting the source URL. Below I will go over the different options we have for filtering and how to update the source URL.
Widget iFrame Code
<iframe src="https://widget.leaguelab.com/v1/XXX/league-listing" style="width: 100%; height: 5093px;" frameborder="0" id="llwidget" name="llwidget"></iframe> <script src="https://widget.leaguelab.com/static/js/widget-loader.js"></script>
- Replace
XXX
with the subdomain of your organization (case sensitive)
Example: https://sandbox.leaguelab.com would be src="https://widget.leaguelab.com/v1/sandbox/league-listing"
width:
attribute can be adjusted as neededheight:
attribute is somewhat irrelevant, as the javascript will adjust the height to fit the content after loading
Filtering
Widget League Listings can be filtered by adding URL extensions to the src
=URL of the iframe code.
Types of Filtering
- sport
- day
- location (using
Location ID
) - neighborhood (using
Neighborhood ID
) nei= - status (Open or Closed)
- current (boolean,
0
or1
) - gender
Example: https://widget.leaguelab.com/v1/XXX/league-listing?sport=Volleyball
...would filter the league listing to only show volleyball leagues.
Combing Filters
Filters can also be combined using &
in the source URL. You can combine as many options as you would like as long as you are only trying to use one option from each filter. Below is an example of filtering for Co-ed volleyball leagues.
Example: https://widget.leaguelab.com/v1/XXX/league-listing?sport=Volleyball&gender=Co-ed
Here is an example of filtering sport, location and gender:
https://widget.leaguelab.com/v1/XXX/league-listing?sport=Kickball&nei=5507&gender=Co-ed