Configuration 

Extension configuration 

See Extension configuration (storagePid, previewPid, uploadFolder, maxBildgroesse).

Site settings 

Set in Site Management > Settings or in config/sites/<site>/settings.yaml:

config/sites/main/settings.yaml
crgalerie:
  pageTitle: '{galerie} – Photo gallery'
  metadata:
    creditField: creator
    licenseField: copyright
  frontend:
    css: true
Copied!
crgalerie.pageTitle
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.creditField
Column in sys_file_metadata that holds the author, e.g. creator (requires EXT:filemetadata). Empty: only (c) … in title or caption, then the photographer of the gallery.
crgalerie.metadata.licenseField
Column in sys_file_metadata that holds the license, e.g. copyright. Empty: no license.
crgalerie.frontend.css
false disables 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(--crg-…, default)) and never sets them. Your values always win – on :root for the whole page or on .crg (gallery) or .crg-uebersicht (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 */
Copied!

The column count applies to grid, cover image and mosaic in columns and to the overview tiles.

Lists and links of gallery and overview are protected against typical project rules (bullets, indentation, underlined links, * { margin: 0 auto }) with a doubled class. To change these properties deliberately, use at least two classes as well, e.g. .crg-uebersicht .crg-uebersicht__kachel { color: … }.

Texts and translations 

All texts are in Resources/Private/Language/ – English as source language, German included. The frontend follows the site language, the module the editor's language. For further languages add a <language>.locallang.xlf with the same keys.

Change single frontend texts with TypoScript:

plugin.tx_crgalerie._LOCAL_LANG.en {
    frontend.showAll = View all %d pictures
}
Copied!

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';
Copied!

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_crgalerie_domain_model_galerie), gallery image (tx_crgalerie_domain_model_bilder), file reference (sys_file_reference), file (sys_file), file metadata (sys_file_metadata)
  • Allowed excludefields: "Hidden" of gallery and gallery image
  • DB mount on the gallery folder (storagePid) with "Edit content" permission
  • File mount on the upload folder (uploadFolder) with the file permissions read folder, add folder, read file, add file, write file, delete file
  • 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
Copied!