Configuration
Extension configuration
See Extension configuration (storage, preview,
upload, max).
Site settings
Set in Site Management > Settings or in
config/:
crgalerie:
pageTitle: '{galerie} – Photo gallery'
metadata:
creditField: creator
licenseField: copyright
frontend:
css: true
crgalerie.page Title - Page title when a gallery is opened from the overview.
{galerie}is replaced by the gallery title. Empty: the page title stays unchanged. crgalerie.metadata. credit Field - Column in
sys_that holds the author, e.g.file_ metadata creator(requires EXT:filemetadata). Empty: only(c) …in title or caption, then the photographer of the gallery. crgalerie.metadata. license Field - Column in
sys_that holds the license, e.g.file_ metadata copyright. Empty: no license. crgalerie.frontend. css falsedisables the bundled gallery CSS (the basic lightbox CSS stays). Your CSS must then contain at least.crg__.bild [hidden] { display: none; }
CSS variables
The bundled CSS only reads CSS variables with a default
(var) and never sets them. Your values always win – on
:root for the whole page or on .crg (gallery) or
.crg- (overview), regardless of the loading order:
:root {
--crg-abstand: 12px; /* gap between images, default 8px */
--crg-radius: 0; /* corner radius, default 4px */
--crg-akzent: #b0002a; /* button and focus outline, default currentColor */
--crg-text-gedaempft: #555; /* secondary texts, default #666 */
--crg-zeilenhoehe: 260px; /* mosaic in rows from 600 px, default 220px */
--crg-zeilenhoehe-mobil: 120px; /* below 600 px, default 100px */
}
.crg {
--crg-spalten: 5; /* from 1024 px, default 4 (overview 3) */
--crg-spalten-tablet: 3; /* 600–1023 px, default 3 (overview 2) */
--crg-spalten-mobil: 1; /* below 600 px, default 2 (overview 1) */
}
.pswp { --crg-lightbox-hintergrund: #111; }
:root { --crg-lightbox-z: 10000; } /* lightbox layer, default 2147483000 */
The column count applies to grid, cover image and mosaic in columns and to the overview tiles.
Important
The sizes attributes of the thumbnails are tuned to the default
columns and row heights. If you change them, adapt sizes in your own
Partials/ (see Overriding templates),
otherwise images become blurry or unnecessarily large.
Lists and links of gallery and overview are protected against typical
project rules (bullets, indentation, underlined links,
* ) with a doubled class. To change these properties
deliberately, use at least two classes as well, e.g.
.crg-.
Texts and translations
All texts are in Resources/ – English as source
language, German included. The frontend follows the site language, the
module the editor's language. For further languages add a
<language>. with the same keys.
Change single frontend texts with TypoScript:
plugin.tx_crgalerie._LOCAL_LANG.en {
frontend.showAll = View all %d pictures
}
Or override whole files, e.g. in ext_localconf.php of your site
package:
$GLOBALS['TYPO3_CONF_VARS']['LANG']['resourceOverrides']['EXT:crgalerie/Resources/Private/Language/locallang.xlf'][]
= 'EXT:my_sitepackage/Resources/Private/Language/Overrides/crgalerie.xlf';
Permissions for editors
The module writes through the DataHandler and the FAL API. The editor group needs:
- Module access Content > Galleries (
web_)crgalerie - Tables (listing and modify): gallery
(
tx_), gallery image (crgalerie_ domain_ model_ galerie tx_), file reference (crgalerie_ domain_ model_ bilder sys_), file (file_ reference sys_), file metadata (file sys_)file_ metadata - Allowed excludefields: "Hidden" of gallery and gallery image
- DB mount on the gallery folder (
storage) with "Edit content" permissionPid - File mount on the upload folder (
upload) with the file permissions read folder, add folder, read file, add file, write file, delete fileFolder - Image processing enabled in the Install Tool
Galleries on the root level (pid 0) can only be edited by admins.
Pre-generating image variants
TYPO3 renders three thumbnail sizes (400/800/1200 px) and one lightbox
variant (longest side 2560 px) per image. Uploads in the module do this
immediately. For existing images, e.g. after clearing _processed_, run:
vendor/bin/typo3 crgalerie:vorwaermen # all visible images
vendor/bin/typo3 crgalerie:vorwaermen --galerie=7 # one gallery only