:navigation-title: Configuration .. _configuration: ============= Configuration ============= This extension ships its frontend TypoScript and its backend page TSconfig in two forms: as TYPO3 **site sets**, and as classic **static templates** plus **page TSconfig files** that are selected on a page. Both forms read the very same files, so they configure an installation identically. Pick one of them per site and stay with it — see :ref:`Do not combine both ` for what happens otherwise. .. _configuration-components: What the sets contain ===================== This extension ships three content elements, so it ships three component sets and one aggregate set that depends on all of them. All three are driven by one Extbase plugin, so they share one TypoScript block, :typoscript:`plugin.tx_academicjobs`. That block is shipped once, in :file:`Configuration/TypoScript/`, and every component includes it. Which component sets a site names therefore decides which content elements the backend offers, not how much TypoScript is loaded. .. list-table:: :header-rows: 1 * - Set - Delivers * - `fgtclb/academic-jobs-new-job-form` - The :guilabel:`Job Form` content element, the frontend form a job offer is entered with. * - `fgtclb/academic-jobs-list` - The :guilabel:`Job List` content element. * - `fgtclb/academic-jobs-detail` - The :guilabel:`Job Details` content element. * - `fgtclb/academic-jobs` - Everything above. This is the set to use unless you deliberately want a subset, and it is the name this extension published before the sets were cut per component — a site configuration that depends on it needs no change. Every component set depends on `fgtclb/academic-base-ctype-group`, the set of :guilabel:`EXT:academic_base` that labels the content element group all academic extensions sort their elements into. The site settings of this extension are declared with the aggregate set: the storage, detail, list and redirect pages, the notification e-mail, the job avatar upload, the content element header switch and the page links of the :ref:`list pagination `. A site that depends on a single component set still gets the shipped defaults, but can only override them in :guilabel:`Site Settings` when it depends on `fgtclb/academic-jobs`. .. _configuration-hidden-by-default: The content elements are hidden by default ========================================== :guilabel:`EXT:academic_jobs` hides all three of its content elements for the whole installation and brings them back per component. Whichever of the two mechanisms below you use, it is what makes an element selectable in the backend again — without one of them the content element is not offered, and existing records keep rendering. .. warning:: This changed in version 2.4. Before it, all three elements were selectable on every page of every installation. Read :ref:`Breaking: Site sets and static templates have been restructured ` before upgrading. An existing content element on a page that does not enable its component keeps its type: the backend shows the stored type followed by :guilabel:`(not enabled on this page)`, and saving keeps it. Content elements whose type an earlier save already replaced are not repaired, the record history shows their former type. .. _site-set: Include the site set ==================== Add the set to the :file:`config.yaml` of the site that should offer the content elements: .. code-block:: diff :caption: config/sites/my-site/config.yaml (diff) base: 'https://example.com/' rootPageId: 1 +dependencies: + - fgtclb/academic-jobs See also `TYPO3 Explained, Using a site set as dependency in a site `__. .. _static-templates: Include static templates ======================== For an installation that still configures its frontend through :sql:`sys_template` records, the same files are registered as static templates and as selectable page TSconfig files. .. tip:: On TYPO3 v13 and v14 we recommend the site set — and if you use it, do not press the backend button :guilabel:`Create a root TypoScript record` on that site. The :sql:`sys_template` record it creates carries the flag :guilabel:`Clear` for constants and setup, and that flag discards everything the site sets contributed. An installation that is already in that state gets its configuration back by selecting the static templates below in that very record. .. _static-typoscript: Include static TypoScript ------------------------- Edit the :sql:`sys_template` record of the site root and add the entry to :guilabel:`Include static (from extensions)`: .. list-table:: :header-rows: 1 * - Entry - Delivers * - :guilabel:`Academic Jobs: Jobs New (academic_jobs)` - The TypoScript of the :guilabel:`Job Form` content element. * - :guilabel:`Academic Jobs: Jobs List (academic_jobs)` - The TypoScript of the :guilabel:`Job List` content element. * - :guilabel:`Academic Jobs: Jobs Detail (academic_jobs)` - The TypoScript of the :guilabel:`Job Details` content element. * - :guilabel:`Academic Jobs: All components (academic_jobs)` - Every component this extension ships, in one entry. * - :guilabel:`Academic Jobs: Shared plugin settings (academic_jobs)` - The shared :typoscript:`plugin.tx_academicjobs` block on its own. This is the entry an installation stored before the configuration was cut per component, and it keeps working — but it does not make any content element selectable, which the page TSconfig below does. .. _static-pagetsconfig: Include static page TSconfig ---------------------------- Edit the page record of the site root, tab :guilabel:`Resources`, field :guilabel:`Page TSconfig`, and add the entry: .. list-table:: :header-rows: 1 * - Entry - Delivers * - :guilabel:`Academic Jobs: Jobs New (academic_jobs)` - Makes the :guilabel:`Job Form` content element selectable, and configures its entry in the new content element wizard. * - :guilabel:`Academic Jobs: Jobs List (academic_jobs)` - The same for :guilabel:`Job List`. * - :guilabel:`Academic Jobs: Jobs Detail (academic_jobs)` - The same for :guilabel:`Job Details`. * - :guilabel:`Academic Jobs: All components (academic_jobs)` - Every component this extension ships, in one entry. The setting is inherited by every page below the one it is set on. .. _configuration-list-pagination: Pagination of the job list ========================== Whether a :guilabel:`Job List` content element splits its jobs into pages, and how many jobs a page holds, is set on each content element, see :ref:`integrator-job-list-pagination`. How many page numbers the navigation links at once is one value for the whole site: .. list-table:: :header-rows: 1 * - Site setting and constant - Default - Meaning * - :typoscript:`plugin.tx_academicjobs.pagination.numberOfLinks` - 5 - The most page numbers the navigation links around the current page. Read with `georgringer/numbered-pagination` only. Without it, the core pagination links every page. The site setting is declared by the aggregate set `fgtclb/academic-jobs`, like every other setting of this extension. A site configured through static templates sets the constant instead. .. _configuration-javascript: Load the script or bring your own ================================= The :guilabel:`Job Form` content element loads two scripts on the page that carries it: CKEditor 4 from its content delivery network, and the module :js:`@fgtclb/academic-jobs/frontend/rich-text.js`, which turns the description fields of the form into rich text editors. No other content element of this extension loads a script. Both are switched off together, per site, for an installation that brings its own editor or wants none: .. list-table:: :header-rows: 1 * - Site setting and constant - Default - Off means * - :yaml:`plugin.tx_academicjobs.assets.js` - :yaml:`true` - The page loads neither the editor nor the module. With the site set, it is a site setting of `fgtclb/academic-jobs`, like every other setting of this extension: .. code-block:: yaml :caption: config/sites/my-site/settings.yaml plugin.tx_academicjobs.assets.js: false With the static template, it is the TypoScript constant of the same name: .. code-block:: typoscript :caption: Constants of the root sys_template record plugin.tx_academicjobs.assets.js = 0 **The form keeps working without the scripts.** The description fields are plain text areas, marked with the class :html:`ace-ckeditor`, and a visitor submits the text as it is. A script of your own finds the fields by that class. A project that overrides :file:`Templates/Job/New.html` keeps whatever its copy loads, until it wraps its own :html:`` and :html:`` in :html:``. .. _one-mechanism-per-site: Do not combine both =================== A site that uses the site set **and** the static template reads the shipped files twice. The site set is applied before the :sql:`sys_template` record, so the second read happens after the site settings and after :file:`config/sites//constants.typoscript` — and it resets every constant the extension ships a default for back to that default. For this extension that is the whole :typoscript:`plugin.tx_academicjobs` constants block: the Fluid root paths, the storage and target page ids, the notification e-mail, the job avatar upload settings, the content element header switch and the :ref:`script switch `, among others. Nothing else is damaged: the :guilabel:`Constants` and :guilabel:`Setup` fields of the :sql:`sys_template` record, the page TSconfig of a page and the page TSconfig files selected on a page are all applied afterwards and still win. Use one mechanism per site and the question does not arise. .. toctree:: :maxdepth: 5 :titlesonly: General/Index Validations/Index RouteEnhancers/Index Labels/Index