diff --git a/config/install/core.entity_form_display.site_documentation.site_documentation.default.yml b/config/install/core.entity_form_display.site_documentation.site_documentation.default.yml index 427029a..197bb90 100644 --- a/config/install/core.entity_form_display.site_documentation.site_documentation.default.yml +++ b/config/install/core.entity_form_display.site_documentation.site_documentation.default.yml @@ -1,12 +1,15 @@ +uuid: ef4b3210-8f00-49e5-98e8-c72fc1865f74 langcode: en status: true dependencies: config: - field.field.site_documentation.site_documentation.field_documentation - - field.field.site_documentation.site_documentation.field_related_documentation + - field.field.site_documentation.site_documentation.field_documentation_topics module: - site_documentation - text +_core: + default_config_hash: 8Zq_HOW0aWtDGkmbju70X4kxGkqjtQrkNHOQeFXJB-8 id: site_documentation.site_documentation.default targetEntityType: site_documentation bundle: site_documentation @@ -22,7 +25,7 @@ content: third_party_settings: { } type: text_textarea_with_summary region: content - field_related_documentation: + field_documentation_topics: weight: 27 settings: match_operator: CONTAINS diff --git a/config/install/core.entity_view_display.site_documentation.site_documentation.default.yml b/config/install/core.entity_view_display.site_documentation.site_documentation.default.yml index c7ab44c..b32c8e2 100644 --- a/config/install/core.entity_view_display.site_documentation.site_documentation.default.yml +++ b/config/install/core.entity_view_display.site_documentation.site_documentation.default.yml @@ -1,12 +1,15 @@ +uuid: d0f31813-9796-41c7-9754-dbaada6bda80 langcode: en status: true dependencies: config: - field.field.site_documentation.site_documentation.field_documentation - - field.field.site_documentation.site_documentation.field_related_documentation + - field.field.site_documentation.site_documentation.field_documentation_topics module: - site_documentation - text +_core: + default_config_hash: sRsJLcDDRJMxxIwYaTrFCzqQQasGEJJtIrAyu3hHwRM id: site_documentation.site_documentation.default targetEntityType: site_documentation bundle: site_documentation @@ -19,14 +22,13 @@ content: third_party_settings: { } type: text_default region: content - field_related_documentation: + field_documentation_topics: weight: 3 - label: above + label: hidden settings: - view_mode: teaser - link: false + link: true third_party_settings: { } - type: entity_reference_entity_view + type: entity_reference_label region: content name: label: hidden diff --git a/config/install/core.entity_view_display.site_documentation.site_documentation.teaser.yml b/config/install/core.entity_view_display.site_documentation.site_documentation.teaser.yml index e0a2a26..1e39606 100644 --- a/config/install/core.entity_view_display.site_documentation.site_documentation.teaser.yml +++ b/config/install/core.entity_view_display.site_documentation.site_documentation.teaser.yml @@ -1,13 +1,16 @@ +uuid: f022c8c0-1427-4654-8403-140fad1a45a2 langcode: en status: true dependencies: config: - core.entity_view_mode.site_documentation.teaser - field.field.site_documentation.site_documentation.field_documentation - - field.field.site_documentation.site_documentation.field_related_documentation + - field.field.site_documentation.site_documentation.field_documentation_topics module: - site_documentation - text +_core: + default_config_hash: 5ALo_VaOTX-a_Fg9i1lrMLyBueK6d5q3s6b07ETUkSw id: site_documentation.site_documentation.teaser targetEntityType: site_documentation bundle: site_documentation @@ -30,5 +33,5 @@ content: link_to_entity: true third_party_settings: { } hidden: - field_related_documentation: true + field_documentation_topics: true user_id: true diff --git a/config/install/field.field.site_documentation.site_documentation.field_documentation_topics.yml b/config/install/field.field.site_documentation.site_documentation.field_documentation_topics.yml new file mode 100644 index 0000000..21d4e4b --- /dev/null +++ b/config/install/field.field.site_documentation.site_documentation.field_documentation_topics.yml @@ -0,0 +1,30 @@ +uuid: 1b3b278e-a5a1-4d0f-b4de-cece86ea4ec8 +langcode: en +status: true +dependencies: + config: + - field.storage.site_documentation.field_documentation_topics + - taxonomy.vocabulary.documentation_topics + module: + - site_documentation +id: site_documentation.site_documentation.field_documentation_topics +field_name: field_documentation_topics +entity_type: site_documentation +bundle: site_documentation +label: Topics +description: '' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + documentation_topics: documentation_topics + sort: + field: name + direction: asc + auto_create: true + auto_create_bundle: '' +field_type: entity_reference diff --git a/config/install/field.field.site_documentation.site_documentation.field_related_documentation.yml b/config/install/field.field.site_documentation.site_documentation.field_related_documentation.yml deleted file mode 100644 index 80a9980..0000000 --- a/config/install/field.field.site_documentation.site_documentation.field_related_documentation.yml +++ /dev/null @@ -1,26 +0,0 @@ -langcode: en -status: true -dependencies: - config: - - field.storage.site_documentation.field_related_documentation - module: - - site_documentation -id: site_documentation.site_documentation.field_related_documentation -field_name: field_related_documentation -entity_type: site_documentation -bundle: site_documentation -label: 'Related Documentation' -description: 'Documentation that may provide related information.' -required: false -translatable: false -default_value: { } -default_value_callback: '' -settings: - handler: 'default:site_documentation' - handler_settings: - target_bundles: null - sort: - field: _none - direction: ASC - auto_create: false -field_type: entity_reference diff --git a/config/install/field.storage.site_documentation.field_related_documentation.yml b/config/install/field.storage.site_documentation.field_documentation_topics.yml similarity index 60% rename from config/install/field.storage.site_documentation.field_related_documentation.yml rename to config/install/field.storage.site_documentation.field_documentation_topics.yml index 2133b66..7803937 100644 --- a/config/install/field.storage.site_documentation.field_related_documentation.yml +++ b/config/install/field.storage.site_documentation.field_documentation_topics.yml @@ -1,14 +1,16 @@ +uuid: dee4902e-2867-4b38-95dd-91644b0bde0d langcode: en status: true dependencies: module: - site_documentation -id: site_documentation.field_related_documentation -field_name: field_related_documentation + - taxonomy +id: site_documentation.field_documentation_topics +field_name: field_documentation_topics entity_type: site_documentation type: entity_reference settings: - target_type: site_documentation + target_type: taxonomy_term module: core locked: false cardinality: -1 diff --git a/config/install/taxonomy.vocabulary.documentation_topics.yml b/config/install/taxonomy.vocabulary.documentation_topics.yml new file mode 100644 index 0000000..55b6226 --- /dev/null +++ b/config/install/taxonomy.vocabulary.documentation_topics.yml @@ -0,0 +1,8 @@ +uuid: 8d44944d-d619-46aa-bc0f-42a22124159b +langcode: en +status: true +dependencies: { } +name: 'Documentation Topics' +vid: documentation_topics +description: 'Use topics to group help documentations on similar topics into categories.' +weight: 0 diff --git a/config/install/views.view.related_site_documents.yml b/config/install/views.view.related_site_documents.yml new file mode 100644 index 0000000..494d42c --- /dev/null +++ b/config/install/views.view.related_site_documents.yml @@ -0,0 +1,534 @@ +uuid: f3a68efa-04be-460a-9251-a22aa265ff9c +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.site_documentation.teaser + - field.storage.site_documentation.field_documentation_topics + - taxonomy.vocabulary.documentation_topics + module: + - site_documentation + - taxonomy +id: related_site_documents +label: 'Site Documents' +module: views +description: '' +tag: '' +base_table: site_documentation_field_data +base_field: id +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: 'Related Site Documents' + fields: + name: + id: name + table: site_documentation_field_data + field: name + relationship: none + group_type: group + admin_label: '' + entity_type: null + entity_field: name + plugin_id: field + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + pager: + type: some + options: + offset: 0 + items_per_page: 20 + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: none + options: { } + cache: + type: tag + options: { } + empty: { } + sorts: { } + arguments: + field_documentation_topics_target_id: + id: field_documentation_topics_target_id + table: site_documentation__field_documentation_topics + field: field_documentation_topics_target_id + relationship: none + group_type: group + admin_label: '' + plugin_id: numeric + default_action: ignore + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: fixed + default_argument_options: + argument: '' + default_argument_skip_url: false + summary_options: + base_path: '' + count: true + override: false + items_per_page: 25 + summary: + sort_order: asc + number_of_records: 0 + format: default_summary + specify_validation: false + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: true + not: false + id: + id: id + table: site_documentation_field_data + field: id + relationship: none + group_type: group + admin_label: '' + entity_type: site_documentation + entity_field: id + plugin_id: numeric + default_action: default + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: node + default_argument_options: { } + default_argument_skip_url: false + summary_options: + base_path: '' + count: true + override: false + items_per_page: 25 + summary: + sort_order: asc + number_of_records: 0 + format: default_summary + specify_validation: false + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: false + not: true + filters: + status: + id: status + table: site_documentation_field_data + field: status + entity_type: site_documentation + entity_field: status + plugin_id: boolean + value: '1' + group: 1 + expose: + operator: '' + operator_limit_selection: false + operator_list: { } + style: + type: default + row: + type: 'entity:site_documentation' + options: + relationship: none + view_mode: teaser + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + contextual_filters_or: false + relationships: { } + header: { } + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + tags: { } + block_1: + id: block_1 + display_title: 'Related Documents' + display_plugin: block + position: 1 + display_options: + display_description: '' + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + tags: { } + block_2: + id: block_2 + display_title: 'All Site Documents' + display_plugin: block + position: 1 + display_options: + fields: + name: + id: name + table: site_documentation_field_data + field: name + relationship: none + group_type: group + admin_label: '' + entity_type: null + entity_field: name + plugin_id: field + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: { } + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + field_documentation_topics: + id: field_documentation_topics + table: site_documentation__field_documentation_topics + field: field_documentation_topics + relationship: none + group_type: group + admin_label: '' + plugin_id: field + label: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: target_id + type: entity_reference_label + settings: + link: false + group_column: target_id + group_columns: { } + group_rows: false + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + pager: + type: none + options: + offset: 0 + empty: + area: + id: area + table: views + field: area + relationship: none + group_type: group + admin_label: '' + plugin_id: text + empty: true + content: + value: '

There are no Documents with selected topic.

' + format: limited_html + tokenize: false + sorts: + field_documentation_topics_target_id: + id: field_documentation_topics_target_id + table: site_documentation__field_documentation_topics + field: field_documentation_topics_target_id + relationship: none + group_type: group + admin_label: '' + plugin_id: standard + order: ASC + expose: + label: '' + field_identifier: '' + exposed: false + name: + id: name + table: site_documentation_field_data + field: name + relationship: none + group_type: group + admin_label: '' + entity_type: site_documentation + entity_field: name + plugin_id: standard + order: ASC + expose: + label: '' + field_identifier: name + exposed: false + arguments: { } + filters: + status: + id: status + table: site_documentation_field_data + field: status + entity_type: site_documentation + entity_field: status + plugin_id: boolean + value: '1' + group: 1 + expose: + operator: '' + operator_limit_selection: false + operator_list: { } + field_documentation_topics_target_id: + id: field_documentation_topics_target_id + table: site_documentation__field_documentation_topics + field: field_documentation_topics_target_id + relationship: none + group_type: group + admin_label: '' + plugin_id: taxonomy_index_tid + operator: or + value: { } + group: 1 + exposed: true + expose: + operator_id: field_documentation_topics_target_id_op + label: 'Filter By Topics' + description: '' + use_operator: false + operator: field_documentation_topics_target_id_op + operator_limit_selection: false + operator_list: { } + identifier: field_documentation_topics_target_id + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + administrator: '0' + anonymous: '0' + content_administrator: '0' + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + vid: documentation_topics + type: select + hierarchy: false + limit: true + error_message: true + filter_groups: + operator: AND + groups: + 1: AND + style: + type: grid + options: + grouping: + - + field: field_documentation_topics + rendered: true + rendered_strip: false + uses_fields: true + columns: 4 + automatic_width: true + alignment: horizontal + row_class_custom: '' + row_class_default: true + col_class_custom: '' + col_class_default: true + row: + type: 'entity:site_documentation' + options: + relationship: none + view_mode: teaser + defaults: + empty: false + use_ajax: false + pager: false + style: false + row: false + fields: false + sorts: false + arguments: false + filters: false + filter_groups: false + use_ajax: true + display_description: '' + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - user + tags: + - 'config:field.storage.site_documentation.field_documentation_topics' diff --git a/css/site_documentation.css b/css/site_documentation.css new file mode 100644 index 0000000..d9c1486 --- /dev/null +++ b/css/site_documentation.css @@ -0,0 +1,4 @@ +.view-related-site-documents .views-row { + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} diff --git a/site_documentation.install b/site_documentation.install new file mode 100644 index 0000000..110c544 --- /dev/null +++ b/site_documentation.install @@ -0,0 +1,39 @@ +getEditable($config); + if ($field_config) { + $field_config->delete(); + } + } + + // Update entity definition of site_documentation. + $sd_definition = $entity_type_manager->getDefinition('site_documentation'); + $entity_definition_update_manager->updateEntityType($sd_definition); + + // Install default configuration for module. + $config_installer->installDefaultConfig('module', 'site_documentation'); + +} diff --git a/site_documentation.libraries.yml b/site_documentation.libraries.yml new file mode 100644 index 0000000..63bcf7a --- /dev/null +++ b/site_documentation.libraries.yml @@ -0,0 +1,4 @@ +site_documentations_list: + css: + theme: + css/site_documentation.css: { } diff --git a/site_documentation.module b/site_documentation.module index 7a4e203..0806ef0 100644 --- a/site_documentation.module +++ b/site_documentation.module @@ -9,6 +9,7 @@ use Drupal\Core\Render\Element; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\site_documentation\Entity\SiteDocumentation; +use Drupal\views\Views; /** * Implements hook_module_implements_alter(). @@ -27,6 +28,11 @@ function site_documentation_theme($existing, $type, $theme, $path) { 'site_documentation' => [ 'render element' => 'elements', ], + 'help_section__site_documentation' => [ + 'variables' => [ + 'documents_view' => null, + ], + ], ]; } @@ -34,17 +40,27 @@ function site_documentation_theme($existing, $type, $theme, $path) { * Implements hook_entity_type_build(). */ function site_documentation_site_documentation_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) { - if ($build['#view_mode'] !== 'full') { + if ($build['#view_mode'] !== 'full' + || !$entity->hasField('field_documentation_topics') + || $entity->get('field_documentation_topics')->isEmpty() + || !Views::getView('related_site_documents') + ) { return; } - $docs = $entity->get('all_docs')->getValue(); - $ids = array_flip(array_keys($docs)); - if (isset($ids[$entity->id()])) { - unset($ids[$entity->id()]); + $topics = array_map(function ($topic) { + return $topic['target_id']; + }, $entity->get('field_documentation_topics')->getValue()); + + if (!empty($topics)) { + $build['related_docs'] = [ + '#type' => 'view', + '#name' => 'related_site_documents', + '#display_id' => 'block_1', + '#embed' => TRUE, + '#arguments' => [implode('+', $topics), $entity->id()], + ]; } - $loaded_docs = SiteDocumentation::loadMultiple(array_keys($ids)); - $build['all_docs'] = \Drupal::entityTypeManager()->getViewBuilder('site_documentation')->viewMultiple($loaded_docs, 'teaser'); } /** @@ -57,7 +73,21 @@ function site_documentation_preprocess_site_documentation(&$vars) { foreach (Element::children($vars['elements']) as $key) { $vars['content'][$key] = $vars['elements'][$key]; } +} +/** + * Implements hook_preprocess_HOOK(). + */ +function site_documentation_preprocess_help_section__site_documentation(&$vars) { + if (Views::getView('related_site_documents')) { + $vars['documents_view'] = [ + '#type' => 'view', + '#name' => 'related_site_documents', + '#display_id' => 'block_2', + '#embed' => TRUE, + '#arguments' => [], + ]; + } } /** @@ -70,3 +100,18 @@ function site_documentation_help_section_info_alter(array &$info) { } } } + +/** + * Implements hook_theme_suggestions_alter(). + */ +function site_documentation_theme_suggestions_alter(array &$suggestions, array $variables, $hook) { + if ($hook !== 'help_section') { + return; + } + + if ($variables['title']->render() === 'Site Documentation') { + // Both lines below are needed. + $suggestions[] = 'help_section__site_documentation'; + $variables['theme_hook_original'] = 'help_section__site_documentation'; + } +} diff --git a/src/Entity/SiteDocumentation.php b/src/Entity/SiteDocumentation.php index 0a8af44..ffe3786 100644 --- a/src/Entity/SiteDocumentation.php +++ b/src/Entity/SiteDocumentation.php @@ -158,7 +158,6 @@ public function save() { return parent::save(); } - /** * {@inheritdoc} */ @@ -179,6 +178,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { 'label' => 'hidden', 'type' => 'author', 'weight' => 0, + 'region' => 'hidden' ]) ->setDisplayOptions('form', [ 'type' => 'entity_reference_autocomplete', @@ -190,8 +190,8 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { 'placeholder' => '', ], ]) - ->setDisplayConfigurable('form', TRUE) - ->setDisplayConfigurable('view', TRUE); + ->setDisplayConfigurable('form', FALSE) + ->setDisplayConfigurable('view', FALSE); $fields['name'] = BaseFieldDefinition::create('string') ->setLabel(t('Name')) @@ -236,12 +236,6 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setRevisionable(TRUE) ->setTranslatable(TRUE); - $fields['all_docs'] = BaseFieldDefinition::create('entity_reference') - ->setLabel('Computed Reference Field Test') - ->setComputed(TRUE) - ->setSetting('target_type', 'site_documentation') - ->setClass(DocsListing::class); - return $fields; } diff --git a/src/SiteDocumentationListBuilder.php b/src/SiteDocumentationListBuilder.php index 98749e8..efa8125 100644 --- a/src/SiteDocumentationListBuilder.php +++ b/src/SiteDocumentationListBuilder.php @@ -51,4 +51,14 @@ protected function getDefaultOperations(EntityInterface $entity) { return $ops; } + /** + * {@inheritdoc} + */ + public function render() { + $build['#prefix'] = Link::createFromRoute( + $this->t('Add Site Documentation'), + 'entity.site_documentation.add_form', [], ['attributes' => ['class' => 'button button--action button--primary']])->toString(); + return $build + parent::render(); + } + } diff --git a/templates/help-section--site-documentation.html.twig b/templates/help-section--site-documentation.html.twig new file mode 100644 index 0000000..20dac95 --- /dev/null +++ b/templates/help-section--site-documentation.html.twig @@ -0,0 +1,55 @@ +{# +/** + * @file + * Theme override for a section of the help page. + * + * This implementation divides the links into 4 columns. + * + * Available variables: + * - title: The section title. + * - description: The description text for the section. + * - links: Links to display in the section. + * - empty: Text to display if there are no links. + * - documents_view: Site documentations renerdable view. + */ +#} + +{{ attach_library("site_documentation/site_documentations_list") }} + +
+

{{ title }}

+

{{ description }}

+ + {% if documents_view %} + {{ documents_view }} + {% elseif links %} + {# Calculate the column length, to divide links into 4 columns. #} + {% set size = links|length // 4 %} + {% if size * 4 < links|length %} + {% set size = size + 1 %} + {% endif %} + + {# Output the links in 4 columns. #} + {% set count = 0 %} + {% for link in links %} + {% if count == 0 %} + {# Start a new column. #} +
+ {% endif %} + {% endfor %} + + {# End the last column, if one is open. #} + {% if count > 0 %} +
+ {% endif %} + {% else %} +

{{ empty }}

+ {% endif %} + diff --git a/templates/site-documentation.html.twig b/templates/site-documentation.html.twig index 509ccd9..14a1401 100644 --- a/templates/site-documentation.html.twig +++ b/templates/site-documentation.html.twig @@ -15,40 +15,32 @@ * @ingroup themeable */ #} +{{ attach_library("site_documentation/site_documentations_list") }} {% if view_mode == 'full' %} -
{% if content %}
- {{content|without('all_docs')}} + {{content|without('related_docs', 'field_documentation_topics')}}
{% endif %} - {% if content.all_docs %} + {% if content.related_docs %}
- {{ 'All Documentation'|t }} + {{ 'Related Documentation'|t }}
- {{ content.all_docs }} + {{ content.related_docs }}
- {#

All Documentation

#} -
{% endif %}
- {% else %} - - - - {% if content %} {{content}} {% endif %} - {% endif %}