Skip to content

Conversation

@michaelkubina
Copy link
Collaborator

This PR adds a new feature, that (if activated in settings) displays the structure path to a search result (comparable to a breadcrumb) in the list view.

Current situation:
In the search result sets the documents have either...

  • their distinct title, that is extracted from the dmdsec-Sections or the @LABEL from the ToC, and a page number => in the case for metadata search
  • or only the page number => in the case for fulltext search

In both cases users cannot know, where within the logical structure of the document, the search result actually appears. Meaning, that a title like "Krankheiten" could both be in "Kapitel 1: Tiere" or "Kapitel 2: Pflanzen" and we would not know before hand. The same logic applies to fulltext results, where we know nothing of this at all and are completly lost.

Solution:
This PR adds a setting to the ListView Plugin that allows for displaying this information. For this to work:

  • a new solr field structure_path was added, that holds a JSON encoded representation of the structure path/breadcrumb, which is required, so that the type (= structure without a custom label) can still be translated after retrieval to the correct language. The field is multivalued, because physical pages can be associated with multiple logical structures (= end of "Kapitel 1" and beginning of "Kapitel 2".
  • it is required to update the solr schema.xml, so that the field is actually defined and used in your instance. Otherwise indexing will fail.

This PR provides the necessary changes to the schema.xml, translation files, listview flexform, the indexer and solrsearch/result as well as to the listview controller and corresponding templates.

Examples:

Volltextsuche nach "Fischer"

grafik

Metadatensuche nach "Optik"

grafik

Volltextsuche nach "Schmied"

grafik

@sebastian-meyer sebastian-meyer added the ↷ feature A new feature or enhancement. label Jan 8, 2026
@sebastian-meyer
Copy link
Member

Please fix the PHPStan issue and adjust the failing test. When all checks succeed I am happy to review this!

@michaelkubina
Copy link
Collaborator Author

okay, i have found out why the test failed. now everything passed.

Copy link
Member

@sebastian-meyer sebastian-meyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! Thank you very much for this great feature!

Could you please extend documentation for this feature and also include all necessary migration steps when upgrading?

@michaelkubina
Copy link
Collaborator Author

I have added the new plugin property to the documentation and i have also updated the administrators instructions for the upgrade path from version 5.1/6.0 to 7.0 ... kind of prematurely for the upcoming release.

To be honest i am not quite sure, if its required in the backend to use "maintenance -> flush cache" in order for the updated extension configuration to be loaded? and if there is a different path or if manual intervention is even required to register the new field in the configuration in a composer based installation (settings.php) or a legacy installation (LocalConfiguration.php). If there are any steps required, it would then luckily only require one additional sentence in the documentation.

Maybe you know the answer out of your pocket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

↷ feature A new feature or enhancement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants