Provides a Drupal Document content type to store organisational multilingual structured PDF/Word etc. documents
The entity_reference_revisions module requires the following patch to be applied:
"patches": {
"drupal/entity_reference_revisions": {
"#2799479 - Views doesn't recognize relationship to host": "https://www.drupal.org/files/issues/2022-06-01/entity_reference_revisions-relationship_host_id-2799479-176.patch"
}
}For a better experience install file_replace and apply the patch:
"drupal/file_replace": {
"#3300659 - Replace files directly from file widget": "https://www.drupal.org/files/issues/2024-02-04/3300659-31-file-replace-button--seven-themes.patch"
},and enable the settings at /admin/config/file_replace/settings.
- Add the following snippet to the
repositoriessection of yourcomposer.jsonfile:
{
"type": "git",
"url": "https://github.com/eaudeweb/edw_document.git"
},
{
"type": "git",
"url": "https://github.com/eaudeweb/edw_utilities.git"
}
-
Run
composer require eaudeweb/edw_document:^1.0 -
Enable the module:
drush en edw_document
- Field type
- File with Language - File with description and language
- Field widget
- File with language - default widget for the
File with Languagefield type. - Multi Language file - display all files grouped by language.
- File with language - default widget for the
- Field Formatter:
- File with Language - File formatter for
file_languagefield type. Extends generic File formatter with the possibility to display the language selected from a dropdown with languages. Ifuse_description_as_link_textsetting is true, then show description if language is not selected. If both are empty then display the filename. Usesuppress_languageto suppress the language with description. - Dropdown File with Language - overrides the default File with Language
formatter and display only files with language as a dropdown (using
dropdown_file_languagetheme). - Files group by Language - Group files in tabs using available languages.
- File with Language - File formatter for
- Facet Processor List item Language - Display the language name instead of langcode.