Skip to content

TYPO3 extension to simplify work with Kitodo.Presentation at DDB-Zeitungsportal

License

Notifications You must be signed in to change notification settings

slub/ddb_kitodo_zeitungsportal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

af406f5 · Feb 19, 2025
Feb 18, 2025
Jan 31, 2025
Jan 31, 2025
Feb 18, 2025
Jan 30, 2025
Jan 31, 2025
Jan 30, 2025
Mar 1, 2021
Jan 31, 2025
Jan 31, 2025
Jan 31, 2025

Repository files navigation

DDB Kitodo Zeitungsportal

TYPO3 extension to simplify work with and make adjustments to Kitodo.Presentation at DDB-Zeitungsportal.

The JavaScript build is based on 5.0.x of Kitodo.Presentation.

System requirements

Important: This extension requires exactly Kitodo.Presentation 5.0.x. It is not compatible with Kitodo.Presentation 5.1 or higher versions for now.

Create unified JavaScript/CSS build

When building, ../dlf/ (i.e., a sibling folder of ddb_kitodo_zeitungsportal) must point to the code of Kitodo.Presentation that you want to use.

cd Build/
nvm use  # If you use NVM
npm ci
npm run build
npm run watch  # (Alternative) Watch Mode

This builds:

  • Resources/Public/JavaScript/ddbKitodoZeitungsportal.js
  • Resources/Public/Css/ddbKitodoZeitungsportal.css

Include and Configure TypoScript Template of ddb_kitodo_zeitungsportal

Include the Template of ddb_kitodo_zeitungsportal

Select the "Includes" tab in Template module for your root page (clicking on "Edit the whole template record") In the "Include static (from extensions)" section:

  • First select "Toolbox Default Tool Templates (dlf)"
  • Then select "DDB: Kitodo Zeitungsportal (ddb_kitodo_zeitungsportal)"

Important: The order of inclusion matters. Make sure Kitodo.Presentation is included before DDB Kitodo Zeitungsportal.

Setup Constants

Edit "Constants" field in the template editor and add these configuration values:

plugin.ddb_kitodo_zeitungsportal {
  viewerPid = [UID of your viewer page]
  configPid = [UID of your Kitodo.Presentation configuration page]
  solrCore = [UID of your Solr core]
  baseUrl = https://domain.com/ [page url on which the viewer will be visible with trailing slash]
}

Add Search Configuration

Edit "Setup" field in the template editor and add these lines to your TypoScript setup:

# FrontendUrl + /newspaper/item
plugin.tx_dlf_searchindocumenttool.settings.searchUrl = https://domain.com/newspaper/item
# Backend-API-URL + path to source-record with *id*
plugin.tx_dlf_searchindocumenttool.settings.documentIdUrlSchema = https://api.com/items/*id*/source/record

After configure and including the template:

  • Clear all TYPO3 caches
  • Check if JavaScript and CSS files are properly loaded in frontend

Configure the Kitodo.Presentation Extension

Example of the dlf part of nested configuration from LocalConfiguration.php file is available here. It can be used as a template for plugin configuration after the installation.

Upgrade to Kitodo.Presentation 5.0.x

  • Upgrade package via Composer
  • In LocalConfiguration.php:
    'FE' => [
        'cacheHash' => [
            'requireCacheHashPresenceParameters' => [
                'tx_dlf[id]',
            ],
        ],
    ],
    This could be set in command line:
    vendor/bin/typo3cms configuration:set --json 'FE/cacheHash/requireCacheHashPresenceParameters' '["tx_dlf[id]"]'
  • Update database:
    • vendor/bin/typo3cms database:updateschema
  • Update setup of viewer template:
    // Before
    plugin.tx_dlf_searchindocumenttool.documentIdUrlSchema = ...
    plugin.tx_dlf_searchindocumenttool.searchUrl = ...
    
    // After
    plugin.tx_dlf_searchindocumenttool.settings.documentIdUrlSchema = ...
    plugin.tx_dlf_searchindocumenttool.settings.searchUrl = ...
    

Maintainer

typo3@slub-dresden.de