If two or more Goobi viewer instances are to be supplied from one Goobi workflow, various requirements must be met. This section describes how to configure common questions for Goobi workflow and Goobi viewer.
Capturing and evaluating the instance
Goobi workflow
In Goobi workflow, the instance in which the work is to be displayed must be entered. To do this, a new ViewerInstance metadata must be added in the rule set. This is then also added to DocStructs that had the CatalogIDDigital metadatum configured as a mandatory metadatum.
The metadatum ViewerInstance is written into a separate field within the Solr Index. For this, the following field definition must be added in the config_indexer.xml configuration file:
With addToChildren=true and addToPages=true it is ensured that metadata in sub-elements and pages can still be searched for if the instance restriction is set.
Goobi viewer Core
For each Goobi viewer instance, a staticQuerySuffix must now be defined, specifying which condition must be met for works to be displayed:
The + stands for an "AND". The brackets summarise everything inside. If conditions are not explicitly linked within a query, this automatically corresponds to an "OR".
Capture and display individual collections
Goobi workflow
In order to enter individual collections per Goobi viewer instance, these must be entered as metadata. To do this, a new metadatum is added in the rule set for each instance. The relevant parts for another collection tree from the rule set are:
If required, a drop-down menu with predefined collection names and values can be defined in goobi_metadataDisplayRules.xml.
Goobi viewer Indexer
First, the exported collections must be written into a separate field within the Solr index. To do this, the following field definition must be added to the config_indexer.xml configuration file:
This field must now be configured in the local config_viewer.xml instead of the usual DC field. For example:
<!-- Show MD2_DC_VIEWER2 instead of DC as collection field at the metadata page -->
<metadata>
<mainMetadataList>
<template name="_DEFAULT">
<metadata label="MD2_DC_VIEWER2" value="">
<param type="translatedfield" key="MD2_DC_VIEWER2_UNTOKENIZED" />
</metadata>
</template>
</mainMetadataList>
</metadata>
<!-- Use MD2_DC_VIEWER2 instead of DC for facetting and in advanced search -->
<search>
<facets>
<field initialElementNumber="3">YEAR</field>
<hierarchicalField initialElementNumber="3">MD2_DC_VIEWER2</hierarchicalField>
<field initialElementNumber="3">DOCSTRCT_TOP</field>
<field initialElementNumber="3">DOCSTRCT_SUB</field>
<field initialElementNumber="3" sortOrder="alphabetical_asc">MD_PLACEPUBLISH</field>
</facets>
<advanced>
<searchFields>
<field>DEFAULT</field>
<field>FULLTEXT</field>
<field>CMS_TEXT_ALL</field>
<field>PI_TOPSTRUCT</field>
<field hierarchical="true">MD2_DC_VIEWER2</field>
<field>DOCSTRCT_TOP</field>
<field>DOCSTRCT_SUB</field>
<field>MD_TITLE</field>
<field>MD_CREATOR</field>
<field>MD_PUBLISHER</field>
<field>MD_PLACEPUBLISH</field>
<field>MD_YEARPUBLISH</field>
<field untokenizeForPhraseSearch="true">MD_SHELFMARK</field>
</searchFields>
</advanced>
</search>
<!-- Additional configuration such as for the breadcrumbs for MD_DC_VIEWER2 -->
<collections>
<collection field="MD2_DC_VIEWER2">
<addHierarchyToBreadcrumbs>true</addHierarchyToBreadcrumbs>
</collection>
<redirectToWork>false</redirectToWork>
</collections>
In addition, the field name must of course be translated accordingly in the messages files. For example:
MD2_DC_VIEWER2=Sammlung
Goobi viewer Backend
To display a collection page with its own tree, a new CMS page must now be created in the Goobi viewer backend based on the "Collection display" template, configured as an overwritten static page and linked in the menu: