Displaying JobAdder XML

Last week I learnt something new! How to build a page from an XML. A client has a JobAdder account and wanted to display the jobs on there website.

JobAdder simply uploads a XML to a folder which I then can grab with the following:

Using a fclose to check if it exists and if not display a simple message.

The page uses mixitup to filter the courses, the filters all come from the categories, locations, and work-types that are set in the xml. Essentially I just traverse the xml pulling the fields I want then using a foreach go through each element within each field and display them how I want.

Then its about displaying each job in the xml. Going through each job parameter that I want and assigning variables that I can then use within my html.

Finally instead of creating a page for each job, I just use the same page, and use the job ID that each job has as a url parameter. Then in the template I check if the url parameter exists, if so it outputs a simpler version of the above (with the filters replaced by a link back to view all jobs) using the full job description instead of the summary.