Back to all articles

Ensuring Pathways is developer friendly

19th October 2021 by Stephen Lockhart

Our ethos for Pathways and its integration into your site has always been centred around making things as simple as possible for you. We provide you tools and it will just work. However we’re also aware some clients want more control, so we’re ensuring Pathways is easy to work with for developers.

From within your Pathways Admin area you can preview all instances and variations of the Pathways tool. You can generate embed code for 100s of different course type and subject combinations, work with our job sectors and create custom widgets.

You can choose to create individual embed codes or use our auto-mapping features.

Pathways instances

Where colleges are managing many hundreds of courses, they often find it useful to store all possible Pathways instances in their own system and dynamically build the embed codes using their own internal mapping and logic.

To make this easier, we provide Web Service end points to return JSON output of all possible variations of Pathways subjects and Pathways job sectors. For the college to store in its own system.

A sample JSON output from the subjects Web Service would be as follows:

{
    "type": "access-to-he",
    "name": "Art and Design",
    "slug": "art-and-design"
},
{
    "type": "access-to-he",
    "name": "Art, Design \u0026 Media",
    "slug": "art-design-media"
},
{
    "type": "access-to-he",
    "name": "Biological Sciences",
    "slug": "biological-sciences"
},

Build the embed code

The Pathways embed code is made up of a single <div> and <script> tag. The data-subject attribute of the <div> tag informs which instance of Pathways to load.

The <script> tag can be placed anywhere on your page and as such, we would recommend adding to a global header or footer template.

The example below will load the Access to HE course for Art and Design, identified by the type access-to-he and the slug art-and-design within the data-subject attribute.

<div id="pathways-123abc" data-subject="access-to-he/art-and-design"></div>

<script src="https://www.career-pathways.co.uk/assets/js/pathways-loader.js" data-key="YOUR_LICENSE_KEY" async crossorigin="anonymous"></script>

You can build your own embed code for every Pathways course instance using the type and slug values returned in our subjects Web Service. And similarly, the job sector Web Service returns relevant slugs for building each job sector instance.

Extending Pathways

Should you be looking to create something more bespoke or use our Pathways data in different ways, we’d like to hear from you.

Our product development roadmap includes extending our system to offer an API service, so if this is of interest it would be great to arrange a time for an initial conversation.