Embed a single route details & map on your website or blog.
Step 1: Choose a Route
Step 2: Configuration
-
Details:
-
Units:
Widget Preview
Step 3: Get the code
If including multiple Trailforks widgets on the same page, the javascript portion below only needs to be included ONCE per page!
PB BBcode
Advanced
-
You can optionally provide your own custom CSS file to custom style the widget to your desire.
Add the following code to the widgets javascript, replacing URL_TO_YOUR_CSS_FILE: var style = "URL_TO_YOUR_CSS_FILE";
You can set the widget width to 100% to have the widget height responsively adjust (must use the JS code, not iframe). -
You can include the widget source directly into your page using PHP CURL or a Javascript Ajax call.
The direct URL to the widget source is: https://www.trailforks.com/widgets/route/
the following are the URL GET paramaters you can pass: id, width, activitytype, map, details, trails, elevation, section, noheader. Use the data-* in the "get the code" box above for reference.