:navigation-title: Templates .. include:: /Includes.rst.txt .. _templates: ============================= Templates and frontend assets ============================= The output of the job board is rendered with Fluid. Copy the files you want to change into your site package and register its paths. .. _templates-override: Override templates ================== Set the site settings :confval:`jobboard-templaterootpath`, :confval:`jobboard-partialrootpath` and :confval:`jobboard-layoutrootpath` to the folders of your site package. Files that you do not copy are taken from the extension. .. code-block:: yaml :caption: config/sites//settings.yaml jobboard: templateRootPath: 'EXT:my_sitepackage/Resources/Private/Extensions/Jobboard/Templates/' partialRootPath: 'EXT:my_sitepackage/Resources/Private/Extensions/Jobboard/Partials/' layoutRootPath: 'EXT:my_sitepackage/Resources/Private/Extensions/Jobboard/Layouts/' Alternatively, add paths in TypoScript, see :ref:`configuration-typoscript-view`. .. _templates-files: Template files ============== All files are in :path:`EXT:jobboard/Resources/Private/`. .. list-table:: :header-rows: 1 :widths: 45 55 * - File - Purpose * - :file:`Layouts/Default.html` - Wrapper :html:`
` * - :file:`Templates/Jobboard/List.html` - List: assets, search form, map and list of jobs * - :file:`Templates/Jobboard/Search.html` - Search result, same structure as the list * - :file:`Templates/Jobboard/Detail.html` - Detail view. One :html:`` per group of fields, for example :code:`renderSalary` or :code:`renderBenefits`. * - :file:`Partials/JobListAssets.html` - CSS and JavaScript of list and search, see :ref:`templates-assets` * - :file:`Partials/SearchForm.html` - Search form and map * - :file:`Partials/Job/Search.html` - The search form itself. Provides the URL for the location suggestions, see :ref:`address-search-override`. * - :file:`Partials/Types/Table.html` - Default list rendering as table * - :file:`Partials/Types/Card.html` - Alternative list rendering as cards, see :ref:`templates-card-layout` * - :file:`Partials/Job/TitleLink.html` - Table cell with the link to the job * - :file:`Partials/Job/JobAreas.html` - Occupational fields of a job, see :ref:`templates-job-areas` * - :file:`Partials/Job/JsonLd.html` - Structured data of the detail view, see :ref:`templates-json-ld` * - :file:`Templates/PluginPreview/Jobboard.html` - Preview in the backend page module * - :file:`Pdf/Jobboard/Detail.html` - PDF version of a job, see :ref:`pdf-export` If a job has an external link (filled by an import only), the list links to this URL in a new window instead of the detail view. .. _templates-card-layout: Card layout =========== The partial :file:`Partials/Types/Card.html` renders each job as a card with occupational fields, position, application deadline, title, a shortened description, a "Read more" button and, if :confval:`jobboard-pidofapplicationform` is set, an "Apply online" button. It has no "Remember?" checkbox. To use it, override :file:`Templates/Jobboard/List.html` and :file:`Templates/Jobboard/Search.html` and replace the table partial: .. code-block:: html :caption: EXT:my_sitepackage/Resources/Private/Extensions/Jobboard/Templates/Jobboard/List.html .. _templates-job-areas: Partial "Job/JobAreas" ====================== Renders all occupational fields of a job, each in a :html:``. :html:`job` The job (:php:`JWeiland\Jobboard\Domain\Model\Job`). Required. :html:`separator` Text between the occupational fields. Optional, default :html:`', '`. Use :html:`''` if the spacing is done with CSS. .. code-block:: html :caption: Render the occupational fields separated by a pipe .. _templates-json-ld: Structured data (JSON-LD) ========================= The detail view adds a :code:`schema.org/JobPosting` as :html:`