Stuck with One-Pager

Hi there,

I´ve build a one-pager like in the Kirby Cookbook example. No problem so far. Works great.

The one-pager contains a job-section, were multiple job-offerings are contained in a js-accordion. Now, my client wants to have the option, to link to specific job offers with specific URL, like

http://www.mysupersite.com/jobs/job-offer-1

As there is no option, to do this with js, I thought, that I create a new template for this, but I dont get this to work.

The structure of the site is

Header
About
...
Jobs (in Accordion)
Footer

The directory structure looks like this

content/
  about/
  jobs/
    job-offer-1/
    job-offer-2/
    job-offer-3/
site/
  snippets/
    about.php
    jobs.php
  templates/
    home.php
    jobs.php

I only get so far, that the “jobs.php” shows the accordion with all job-offerings. How can I fetch a single job-offering in this template?

I´m stuck, any advice very appreciated

TIA

Do you want to link directly to the content within the accordion?

No, I would like link to a single job-offer on a single page, that only shares header and footer with the one-pager.

By default, every page in Kirby is available through its URL, so unless you use any redirects, each page in jobs is already accessible via

http://www.mysupersite.com/jobs/job-offer-1

All you need to do is create a job template.

Hi texnixe, thanks a lot, works like a charm.

I knew, that it should be that simple, but didn´t realize to call the template “job.php” instead of “jobs.php”