diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_content_block/cgov_content_block.info.yml b/docroot/profiles/custom/cgov_site/modules/custom/cgov_content_block/cgov_content_block.info.yml index f68568cd5b..caea6b137c 100644 --- a/docroot/profiles/custom/cgov_site/modules/custom/cgov_content_block/cgov_content_block.info.yml +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_content_block/cgov_content_block.info.yml @@ -11,3 +11,5 @@ dependencies: - 'drupal:field' - 'drupal:language' - 'drupal:text' + - 'drupal:views' + - 'entity_browser:entity_browser' diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_core/config/install/editor.editor.ncids_full_html.yml b/docroot/profiles/custom/cgov_site/modules/custom/cgov_core/config/install/editor.editor.ncids_full_html.yml index 6f05cf87b5..6eb3f65e42 100644 --- a/docroot/profiles/custom/cgov_site/modules/custom/cgov_core/config/install/editor.editor.ncids_full_html.yml +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_core/config/install/editor.editor.ncids_full_html.yml @@ -23,22 +23,23 @@ settings: - strikethrough - superscript - subscript - - numberedList - - bulletedList - removeFormat - '|' + - bulletedList + - numberedList + - indent + - outdent + - '|' - link - '|' - insertTable - '|' - - indent - - outdent - - '|' - cgov_image_button - cgov_infographic_button - cgov_video_button - - cgov_featured_content_button - insert_external_link_block + - insert_content_block_content + - cgov_featured_content_button - '|' - glossifier - sourceEditing diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_core/config/install/filter.format.ncids_full_html.yml b/docroot/profiles/custom/cgov_site/modules/custom/cgov_core/config/install/filter.format.ncids_full_html.yml index 37822e9519..520efa0e4b 100644 --- a/docroot/profiles/custom/cgov_site/modules/custom/cgov_core/config/install/filter.format.ncids_full_html.yml +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_core/config/install/filter.format.ncids_full_html.yml @@ -7,7 +7,6 @@ dependencies: - entity_embed - linkit - media - - nci_ckeditor5_cleanup - nci_definition - token_filter name: 'NCIDS Full HTML' @@ -97,6 +96,7 @@ filters: weight: -48 settings: title: false + media_substitution: metadata media_embed: id: media_embed provider: media diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/cgov_embedded_block.info.yml b/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/cgov_embedded_block.info.yml index 0762558e76..2724cc660d 100644 --- a/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/cgov_embedded_block.info.yml +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/cgov_embedded_block.info.yml @@ -1,9 +1,10 @@ -name: 'CGov Embvedded Block' +name: 'CGov Embedded Block' type: module package: 'CGov Digital Platform' description: 'Embeddable block content support' core_version_requirement: '^9.4 || ^10' dependencies: + - 'cgov_content_block:cgov_content_block' - 'cgov_core:cgov_core' - 'drupal:block_content' - 'drupal:views' diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/cgov_embedded_block.install b/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/cgov_embedded_block.install index e9f928cedf..39cc0e2f7e 100644 --- a/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/cgov_embedded_block.install +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/cgov_embedded_block.install @@ -33,6 +33,22 @@ function _cgov_embedded_block_install_permissions(CgovCoreTools $siteHelper) { $perms = [ 'admin_ui' => [ 'access block_content_browser entity browser pages', + 'access content_block_raw_html_browser entity browser pages', + ], + ]; + + $siteHelper->addRolePermissions($perms); +} + +/** + * The most recent update hook. + */ +function cgov_embedded_block_update_10001() { + // Get our helper. + $siteHelper = \Drupal::service('cgov_core.tools'); + $perms = [ + 'admin_ui' => [ + 'access content_block_raw_html_browser entity browser pages', ], ]; diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/cgov_embedded_block.module b/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/cgov_embedded_block.module index 97ab784a53..35865dd71f 100644 --- a/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/cgov_embedded_block.module +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/cgov_embedded_block.module @@ -133,9 +133,13 @@ function cgov_embedded_block_theme_suggestions_block_content(array $variables) { function cgov_embedded_block_views_query_alter(ViewExecutable $view, QueryPluginBase $query) { // Check that we are altering the correct view. if ($view->id() == 'block_content_browser') { + $excluded_values = ['cgov_image_carousel', 'cgov_video_carousel']; + if ($view->current_display == 'content_block_raw_html_browser') { + $excluded_values[] = 'cgov_external_link_block'; + $excluded_values[] = 'ncids_mega_menu_content'; + } if ($query instanceof Sql) { $field_name = 'block_content_field_data.type'; - $excluded_values = ['cgov_image_carousel', 'cgov_video_carousel']; $query->addWhere(0, $field_name, $excluded_values, 'NOT IN'); } } diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/config/install/embed.button.insert_content_block_content.yml b/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/config/install/embed.button.insert_content_block_content.yml new file mode 100644 index 0000000000..1e7df82ecb --- /dev/null +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/config/install/embed.button.insert_content_block_content.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.block_content.full + - entity_browser.browser.content_block_raw_html_browser + module: + - block_content + - entity_embed +label: 'Insert Content Block Content' +id: insert_content_block_content +type_id: entity +type_settings: + entity_type: block_content + bundles: { } + display_plugins: + - 'view_mode:block_content.full' + entity_browser: content_block_raw_html_browser + entity_browser_settings: + display_review: false +icon: + uri: 'module://cgov_embedded_block/assets/images/embed_block.svg' +icon_uuid: null diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/config/install/entity_browser.browser.content_block_raw_html_browser.yml b/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/config/install/entity_browser.browser.content_block_raw_html_browser.yml new file mode 100644 index 0000000000..cac559ccea --- /dev/null +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/config/install/entity_browser.browser.content_block_raw_html_browser.yml @@ -0,0 +1,30 @@ +langcode: en +status: true +dependencies: + config: + - views.view.block_content_browser + module: + - views +name: content_block_raw_html_browser +label: 'Content Block Raw HTML Browser' +display: iframe +display_configuration: + width: 100% + height: '500' + link_text: 'Select entities' + auto_open: true +selection_display: no_display +selection_display_configuration: { } +widget_selector: tabs +widget_selector_configuration: { } +widgets: + 97702a23-35e5-4310-ad78-6e976e722099: + settings: + submit_text: 'Select block' + auto_select: false + view: block_content_browser + view_display: content_block_raw_html_browser + uuid: 97702a23-35e5-4310-ad78-6e976e722099 + weight: 1 + label: Select + id: view diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/config/install/views.view.block_content_browser.yml b/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/config/install/views.view.block_content_browser.yml index 77acd2de2f..c736234600 100644 --- a/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/config/install/views.view.block_content_browser.yml +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_embedded_block/config/install/views.view.block_content_browser.yml @@ -1,6 +1,9 @@ langcode: en status: true dependencies: + config: + - block_content.type.content_block + - block_content.type.raw_html_block module: - block_content - entity_browser @@ -453,12 +456,13 @@ display: content_editor: '0' image_manager: '0' advanced_editor: '0' + blog_manager: '0' layout_manager: '0' site_admin: '0' pdq_importer: '0' anonymous: '0' - administrator: '0' admin_ui: '0' + content_previewer: '0' reduce: false is_grouped: false group_info: @@ -637,12 +641,488 @@ display: - url - url.query_args tags: { } - entity_browser_1: - id: entity_browser_1 - display_title: 'Entity browser' + content_block_raw_html_browser: + id: content_block_raw_html_browser + display_title: 'Content block raw html browser' display_plugin: entity_browser position: 1 display_options: + fields: + entity_browser_select: + id: entity_browser_select + table: block_content + field: entity_browser_select + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + plugin_id: entity_browser_select + 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 + info: + id: info + table: block_content_field_data + field: info + relationship: none + group_type: group + admin_label: '' + entity_type: null + entity_field: info + plugin_id: field + label: Name + 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: + link_to_entity: false + 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 + langcode: + id: langcode + table: block_content_field_data + field: langcode + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: langcode + plugin_id: field + label: Language + 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: language + settings: + link_to_entity: false + native_language: false + 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 + status: + id: status + table: block_content_field_data + field: status + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: status + plugin_id: field + label: Published + 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: boolean + settings: + format: yes-no + format_custom_false: '' + format_custom_true: '' + 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 + filters: + info: + id: info + table: block_content_field_data + field: info + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: info + plugin_id: string + operator: contains + value: '' + group: 1 + exposed: true + expose: + operator_id: info_op + label: Name + description: '' + use_operator: false + operator: info_op + operator_limit_selection: false + operator_list: { } + identifier: info + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + content_author: '0' + content_editor: '0' + image_manager: '0' + advanced_editor: '0' + layout_manager: '0' + site_admin: '0' + pdq_importer: '0' + anonymous: '0' + administrator: '0' + placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + type: + id: type + table: block_content_field_data + field: type + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: type + plugin_id: bundle + operator: in + value: + content_block: content_block + raw_html_block: raw_html_block + group: 1 + exposed: true + expose: + operator_id: type_op + label: 'Block type' + description: '' + use_operator: false + operator: type_op + operator_limit_selection: false + operator_list: { } + identifier: type + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + content_author: '0' + content_editor: '0' + image_manager: '0' + advanced_editor: '0' + blog_manager: '0' + layout_manager: '0' + site_admin: '0' + pdq_importer: '0' + anonymous: '0' + admin_ui: '0' + content_previewer: '0' + reduce: true + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + langcode: + id: langcode + table: block_content_field_data + field: langcode + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: langcode + plugin_id: language + operator: in + value: + en: en + es: es + group: 1 + exposed: true + expose: + operator_id: langcode_op + label: Language + description: '' + use_operator: false + operator: langcode_op + operator_limit_selection: false + operator_list: { } + identifier: langcode + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + content_author: '0' + content_editor: '0' + image_manager: '0' + advanced_editor: '0' + layout_manager: '0' + site_admin: '0' + pdq_importer: '0' + anonymous: '0' + administrator: '0' + reduce: true + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + status: + id: status + table: block_content_field_data + field: status + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: status + plugin_id: boolean + operator: '=' + value: '1' + group: 1 + exposed: true + expose: + operator_id: '' + label: Published + description: '' + use_operator: false + operator: status_op + operator_limit_selection: false + operator_list: { } + identifier: status + required: true + remember: false + multiple: false + remember_roles: + authenticated: authenticated + content_author: '0' + content_editor: '0' + image_manager: '0' + advanced_editor: '0' + layout_manager: '0' + site_admin: '0' + pdq_importer: '0' + anonymous: '0' + administrator: '0' + admin_ui: '0' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reusable: + id: reusable + table: block_content_field_data + field: reusable + entity_type: block_content + entity_field: reusable + plugin_id: boolean + value: '1' + group: 1 + expose: + operator_limit_selection: false + operator_list: { } + filter_groups: + operator: AND + groups: + 1: AND + defaults: + filters: false + filter_groups: false + display_description: '' display_extenders: { } cache_metadata: max-age: -1 @@ -652,9 +1132,9 @@ display: - url - url.query_args tags: { } - external_link_browser: - id: external_link_browser - display_title: 'External link browser' + entity_browser_1: + id: entity_browser_1 + display_title: 'Content block browser' display_plugin: entity_browser position: 1 display_options: @@ -969,10 +1449,9 @@ display: entity_field: type plugin_id: bundle operator: in - value: - cgov_external_link_block: cgov_external_link_block + value: { } group: 1 - exposed: false + exposed: true expose: operator_id: type_op label: 'Block type' @@ -1130,7 +1609,6 @@ display: groups: 1: AND defaults: - fields: false filters: false filter_groups: false display_description: '' diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/cgov_external_link_block.features.yml b/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/cgov_external_link_block.features.yml index c2e6312411..3e6cbfac18 100644 --- a/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/cgov_external_link_block.features.yml +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/cgov_external_link_block.features.yml @@ -10,3 +10,5 @@ excluded: - user.role.blog_manager - user.role.image_manager - user.role.pdq_importer +required: + - views.view.external_link_content_browser diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/cgov_external_link_block.info.yml b/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/cgov_external_link_block.info.yml index b08e8adc97..f0d5a4e688 100644 --- a/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/cgov_external_link_block.info.yml +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/cgov_external_link_block.info.yml @@ -4,18 +4,26 @@ package: 'CGov Digital Platform' description: 'Allows External Links to be featured in content' core_version_requirement: '^9.4 || ^10' dependencies: + - 'cgov_content_block:cgov_content_block' - 'cgov_core:cgov_core' - 'cgov_embedded_block:cgov_embedded_block' - 'cgov_image:cgov_image' + - 'drupal:block' - 'drupal:block_content' - 'drupal:content_moderation' - 'drupal:content_translation' - 'drupal:field' + - 'drupal:filter' - 'drupal:language' - 'drupal:link' - 'drupal:media' + - 'drupal:system' + - 'drupal:taxonomy' - 'drupal:text' + - 'drupal:toolbar' + - 'drupal:user' - 'drupal:views' - 'embed:embed' - 'entity_browser:entity_browser' - 'entity_embed:entity_embed' + - 'moderation_sidebar:moderation_sidebar' diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/cgov_external_link_block.module b/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/cgov_external_link_block.module index ce25ba8f16..fcfe9876f6 100644 --- a/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/cgov_external_link_block.module +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/cgov_external_link_block.module @@ -5,6 +5,10 @@ * Contains cgov_external_link_block.module. */ +use Drupal\views\Plugin\views\query\QueryPluginBase; +use Drupal\views\Plugin\views\query\Sql; +use Drupal\views\ViewExecutable; + /** * Implements hook_field_widget_single_element_form_alter(). */ @@ -22,3 +26,23 @@ function cgov_external_link_block_field_widget_single_element_form_alter(&$eleme $element['uri']['#process'] = NULL; } } + +/** + * Implements hook_views_query_alter(). + */ +function cgov_external_link_block_views_query_alter(ViewExecutable $view, QueryPluginBase $query) { + // Check that we are altering the correct view. + if ($view->id() == 'external_link_content_browser') { + if ($query instanceof Sql) { + $field_name = 'block_content_field_data.type'; + $excluded_values = [ + 'content_block', + 'cgov_image_carousel', + 'ncids_mega_menu_content', + 'raw_html_block', + 'cgov_video_carousel', + ]; + $query->addWhere(0, $field_name, $excluded_values, 'NOT IN'); + } + } +} diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/config/install/entity_browser.browser.embedded_external_link_browser.yml b/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/config/install/entity_browser.browser.embedded_external_link_browser.yml index 20b10cc20e..f8945acbd9 100644 --- a/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/config/install/entity_browser.browser.embedded_external_link_browser.yml +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/config/install/entity_browser.browser.embedded_external_link_browser.yml @@ -2,7 +2,7 @@ langcode: en status: true dependencies: config: - - views.view.block_content_browser + - views.view.external_link_content_browser module: - views name: embedded_external_link_browser @@ -19,12 +19,12 @@ widget_selector: single widget_selector_configuration: { } widgets: 1751a6e7-5dc2-4061-b77e-821b506ff923: - id: view - uuid: 1751a6e7-5dc2-4061-b77e-821b506ff923 - label: 'Select external link block to embed' - weight: 1 settings: submit_text: 'Select external link block' auto_select: false - view: block_content_browser - view_display: external_link_browser + view: external_link_content_browser + view_display: entity_browser_external_link + uuid: 1751a6e7-5dc2-4061-b77e-821b506ff923 + weight: 1 + label: 'Select external link block to embed' + id: view diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/config/install/views.view.external_link_content_browser.yml b/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/config/install/views.view.external_link_content_browser.yml new file mode 100644 index 0000000000..cf9d911091 --- /dev/null +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_external_link_block/config/install/views.view.external_link_content_browser.yml @@ -0,0 +1,1080 @@ +langcode: en +status: true +dependencies: + module: + - block_content + - entity_browser +id: external_link_content_browser +label: 'External Link Content Browser' +module: views +description: '' +tag: '' +base_table: block_content_field_data +base_field: id +display: + default: + id: default + display_title: Master + display_plugin: default + position: 0 + display_options: + fields: + entity_browser_select: + id: entity_browser_select + table: block_content + field: entity_browser_select + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + plugin_id: entity_browser_select + 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 + info: + id: info + table: block_content_field_data + field: info + relationship: none + group_type: group + admin_label: '' + entity_type: null + entity_field: info + plugin_id: field + label: Name + 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: + link_to_entity: false + 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 + type: + id: type + table: block_content_field_data + field: type + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: type + plugin_id: field + label: 'Block type' + 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: target_id + type: entity_reference_label + settings: + link: true + group_column: target_id + 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 + langcode: + id: langcode + table: block_content_field_data + field: langcode + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: langcode + plugin_id: field + label: Language + 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: language + settings: + link_to_entity: false + native_language: false + 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 + status: + id: status + table: block_content_field_data + field: status + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: status + plugin_id: field + label: Published + 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: boolean + settings: + format: yes-no + format_custom_false: '' + format_custom_true: '' + 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: mini + options: + offset: 0 + pagination_heading_level: h4 + items_per_page: 10 + total_pages: null + id: 0 + tags: + next: ›› + previous: ‹‹ + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + 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: { } + filters: + info: + id: info + table: block_content_field_data + field: info + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: info + plugin_id: string + operator: contains + value: '' + group: 1 + exposed: true + expose: + operator_id: info_op + label: Name + description: '' + use_operator: false + operator: info_op + operator_limit_selection: false + operator_list: { } + identifier: info + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + content_author: '0' + content_editor: '0' + image_manager: '0' + advanced_editor: '0' + layout_manager: '0' + site_admin: '0' + pdq_importer: '0' + anonymous: '0' + administrator: '0' + placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + type: + id: type + table: block_content_field_data + field: type + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: type + plugin_id: bundle + operator: in + value: { } + group: 1 + exposed: true + expose: + operator_id: type_op + label: 'Block type' + description: '' + use_operator: false + operator: type_op + operator_limit_selection: false + operator_list: { } + identifier: type + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + content_author: '0' + content_editor: '0' + image_manager: '0' + advanced_editor: '0' + blog_manager: '0' + layout_manager: '0' + site_admin: '0' + pdq_importer: '0' + anonymous: '0' + admin_ui: '0' + content_previewer: '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: { } + langcode: + id: langcode + table: block_content_field_data + field: langcode + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: langcode + plugin_id: language + operator: in + value: + en: en + es: es + group: 1 + exposed: true + expose: + operator_id: langcode_op + label: Language + description: '' + use_operator: false + operator: langcode_op + operator_limit_selection: false + operator_list: { } + identifier: langcode + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + content_author: '0' + content_editor: '0' + image_manager: '0' + advanced_editor: '0' + layout_manager: '0' + site_admin: '0' + pdq_importer: '0' + anonymous: '0' + administrator: '0' + reduce: true + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + status: + id: status + table: block_content_field_data + field: status + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: status + plugin_id: boolean + operator: '=' + value: '1' + group: 1 + exposed: true + expose: + operator_id: '' + label: Published + description: '' + use_operator: false + operator: status_op + operator_limit_selection: false + operator_list: { } + identifier: status + required: true + remember: false + multiple: false + remember_roles: + authenticated: authenticated + content_author: '0' + content_editor: '0' + image_manager: '0' + advanced_editor: '0' + layout_manager: '0' + site_admin: '0' + pdq_importer: '0' + anonymous: '0' + administrator: '0' + admin_ui: '0' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reusable: + id: reusable + table: block_content_field_data + field: reusable + entity_type: block_content + entity_field: reusable + plugin_id: boolean + value: '1' + group: 1 + expose: + operator_limit_selection: false + operator_list: { } + filter_groups: + operator: AND + groups: + 1: AND + style: + type: table + options: + grouping: { } + row_class: '' + default_row_class: true + columns: + info: info + default: '-1' + info: + info: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + override: true + sticky: false + summary: '' + empty_table: false + caption: '' + description: '' + row: + type: 'entity:block_content' + options: + view_mode: default + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: { } + header: { } + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + tags: { } + entity_browser_external_link: + id: entity_browser_external_link + display_title: 'External link browser' + display_plugin: entity_browser + position: 1 + display_options: + fields: + entity_browser_select: + id: entity_browser_select + table: block_content + field: entity_browser_select + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + plugin_id: entity_browser_select + 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 + info: + id: info + table: block_content_field_data + field: info + relationship: none + group_type: group + admin_label: '' + entity_type: null + entity_field: info + plugin_id: field + label: Name + 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: + link_to_entity: false + 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 + langcode: + id: langcode + table: block_content_field_data + field: langcode + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: langcode + plugin_id: field + label: Language + 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: language + settings: + link_to_entity: false + native_language: false + 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 + status: + id: status + table: block_content_field_data + field: status + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: status + plugin_id: field + label: Published + 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: boolean + settings: + format: yes-no + format_custom_false: '' + format_custom_true: '' + 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 + filters: + info: + id: info + table: block_content_field_data + field: info + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: info + plugin_id: string + operator: contains + value: '' + group: 1 + exposed: true + expose: + operator_id: info_op + label: Name + description: '' + use_operator: false + operator: info_op + operator_limit_selection: false + operator_list: { } + identifier: info + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + content_author: '0' + content_editor: '0' + image_manager: '0' + advanced_editor: '0' + layout_manager: '0' + site_admin: '0' + pdq_importer: '0' + anonymous: '0' + administrator: '0' + placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + langcode: + id: langcode + table: block_content_field_data + field: langcode + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: langcode + plugin_id: language + operator: in + value: + en: en + es: es + group: 1 + exposed: true + expose: + operator_id: langcode_op + label: 'Translation language' + description: '' + use_operator: false + operator: langcode_op + operator_limit_selection: false + operator_list: { } + identifier: langcode + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + content_author: '0' + content_editor: '0' + image_manager: '0' + advanced_editor: '0' + blog_manager: '0' + layout_manager: '0' + site_admin: '0' + pdq_importer: '0' + anonymous: '0' + admin_ui: '0' + content_previewer: '0' + reduce: true + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + status: + id: status + table: block_content_field_data + field: status + relationship: none + group_type: group + admin_label: '' + entity_type: block_content + entity_field: status + plugin_id: boolean + operator: '=' + value: '1' + group: 1 + exposed: true + expose: + operator_id: '' + label: Published + description: '' + use_operator: false + operator: status_op + operator_limit_selection: false + operator_list: { } + identifier: status + required: true + remember: false + multiple: false + remember_roles: + authenticated: authenticated + content_author: '0' + content_editor: '0' + image_manager: '0' + advanced_editor: '0' + layout_manager: '0' + site_admin: '0' + pdq_importer: '0' + anonymous: '0' + administrator: '0' + admin_ui: '0' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reusable: + id: reusable + table: block_content_field_data + field: reusable + entity_type: block_content + entity_field: reusable + plugin_id: boolean + value: '1' + group: 1 + expose: + operator_limit_selection: false + operator_list: { } + filter_groups: + operator: AND + groups: + 1: AND + defaults: + fields: false + filters: false + filter_groups: false + display_description: '' + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - url.query_args + tags: { } diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_yaml_content/content/07900_factbook_pages.content.yml b/docroot/profiles/custom/cgov_site/modules/custom/cgov_yaml_content/content/07900_factbook_pages.content.yml index 7e553732d1..56bf5b94ad 100644 --- a/docroot/profiles/custom/cgov_site/modules/custom/cgov_yaml_content/content/07900_factbook_pages.content.yml +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_yaml_content/content/07900_factbook_pages.content.yml @@ -53,7 +53,7 @@
The information in this section is meant to help you cope with the many issues and concerns that occur when you have cancer.
+ Feelings and Cancer + Adjusting to Cancer + Support for Caregivers + Survivorship + Advanced Cancer + Managing Cancer Care + + body__ES: + - format: "full_html" + value: | +Esta sección tiene información para ayudarle a superar los problemas y preocupaciones que suceden cuando se tiene cáncer.
+ Los sentimientos y el cáncer + La adaptación al cáncer + Apoyo para quienes cuidan a pacientes con cáncer + Supervivencia + Cáncer avanzado + Manejo de la atención del cáncer +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vobis voluptatum perceptarum recordatio + vitam beatam facit, et quidem corpore perceptarum. Tum Quintus: Est plane, Piso, ut dicis, inquit.
+Primum cur ista res digna odio est, nisi quod est turpis? Duo Reges: constructio interrete. + Rhetorice igitur, inquam, nos mavis quam dialectice disputare?
+Primum cur ista res digna odio est, nisi quod est turpis? Duo Reges: constructio interrete. + Rhetorice igitur, inquam, nos mavis quam dialectice disputare?
+Primum cur ista res digna odio est, nisi quod est turpis? Duo Reges: constructio interrete. + Rhetorice igitur, inquam, nos mavis quam dialectice disputare?
+Primum cur ista res digna odio est, nisi quod est turpis? Duo Reges: constructio interrete. + Rhetorice igitur, inquam, nos mavis quam dialectice disputare?
+Primum cur ista res digna odio est, nisi quod est turpis? Duo Reges: constructio interrete. + Rhetorice igitur, inquam, nos mavis quam dialectice disputare?
+ field_article_body__ES: + - entity: 'paragraph' + type: "body_section" + field_body_section_content: + - format: "ncids_full_html" + value: | +SPANISH Paragraph
+ - entity: 'paragraph' + type: "body_section" + field_body_section_content: + - format: "ncids_full_html" + value: | +SPANISH Paragraph 2
+ field_browser_title: + value: "This is the Cgov Testing Content Block Embed Browser Title" + field_feature_card_description: + value: "This is a feature card Testing Content Block Embed description" + field_card_title: + value: "Basic Article Title Testing Content Block EmbedEnglish" + field_date_display_mode: + - value: 'posted' + - value: 'reviewed' + - value: 'updated' + field_page_description: + value: "This is the Meta Description AKA Page Description Testing Content Block Embed" + field_date_posted: + value: "2014-11-10" + field_date_reviewed: + value: "2012-12-10" + field_date_updated: + value: "2018-02-10" + +## Article page with clickable testing elements: +## Sortable table +- entity: 'node' + type: 'cgov_article' + langcode: en + status: 1 + moderation_state: + value: 'published' + title: 'Clickable Content' + field_page_description: + value: 'An article with clickable content for testing' + field_browser_title: + value: 'Clickable Content' + field_site_section: + - '#process': + callback: 'reference' + args: + - 'taxonomy_term' + - vid: 'cgov_site_sections' + computed_path: '/pets' + field_pretty_url: + value: 'test-content' + field_intro_text: + - format: "streamlined" + value: | +Click links on this page to test custom analytics data attributes. Use of a multipronged approach within hospitals, including community centers, not only eliminated treatment disparities among black and white patients with early-stage lung cancer, it also improved treatment rates for all patients.
+ field_article_body: + ### Data attributes / custom links + - entity: 'paragraph' + type: 'body_section' + field_body_section_heading: + - format: 'simple' + value: 'Common cancer types: custom links' + field_body_section_content: + - format: 'ncids_full_html' + value: | +There are several main types of cancer. Carcinoma is a cancer that begins in the skin or in tissues that line or cover internal organs. Sarcoma is a cancer that begins in bone, cartilage, fat, muscle, blood vessels, or other connective or supportive tissue. Leukemia is a cancer that starts in blood-forming tissue, such as the bone marrow, and causes large numbers of abnormal blood cells to be produced and enter the blood. Lymphoma and multiple myeloma are cancers that begin in the cells of the immune system. Central nervous system cancers are cancers that begin in the tissues of the brain and spinal cord. Also called malignancy.
+ +Cancer prevention is a critical component of our effort to reduce the burden of cancer in the United States and globally. As a measure of its importance, cancer prevention has the potential, in the long run, to save even more lives than treatment. +
“It is important to recognize that cancer mortality rates are declining in the 20-to-49-year-old age group, and that the rates of decline among women in this age group are faster than those in older women,” said Douglas R. Lowy, M.D., acting director of NCI. + The authors also reported in the special section that the incidence rates of in situ breast cancer and nonmalignant central nervous system tumors among women and men ages 20 to 49 are substantial. They wrote that some of the most frequent malignant and nonmalignant tumors that occur in this age group may be associated with considerable long-term and late effects related to the disease or its treatment. The authors conclude that access to timely and high-quality treatment and survivorship care is important to improve health outcomes and quality of life for younger adults diagnosed with cancer.
+Effective prevention will also reduce cancer incidence and morbidity, meaning fewer people will have to face the physical, financial, social, and psychological harms of a cancer diagnosis and treatment.
+ +One approach to cancer prevention is reducing or eliminating exposures to cancer-causing substances in the environment, such as asbestos, tobacco smoke, and radon gas. Another approach is to protect the body against such exposures or reduce their effect. For example, using sun screen to protect the skin against ultraviolet radiation and getting vaccinated against cancer-causing viruses, including certain types of human papillomavirus (HPV) that cause cervical and several other types of cancer, can protect against processes that can eventually lead to cancer. In addition, some cancer screening tests, such as the Pap smear for cervical cancer and colonoscopy for colorectal cancer, can aid in cancer prevention. These tests detect premalignant lesions that can be removed or destroyed before they progress to cancer.
+ field_date_posted: + value: '2019-06-19' + field_date_reviewed: + value: '2019-06-19' + field_date_updated: + value: '2019-06-19' + field_date_display_mode: + value: 'reviewed' diff --git a/docroot/profiles/custom/cgov_site/modules/custom/cgov_yaml_content/content/16810_article_embed_content_blocks_content_block_and_raw_html.content.yml b/docroot/profiles/custom/cgov_site/modules/custom/cgov_yaml_content/content/16810_article_embed_content_blocks_content_block_and_raw_html.content.yml new file mode 100644 index 0000000000..3181ee9a65 --- /dev/null +++ b/docroot/profiles/custom/cgov_site/modules/custom/cgov_yaml_content/content/16810_article_embed_content_blocks_content_block_and_raw_html.content.yml @@ -0,0 +1,140 @@ +- entity: "node" + type: "cgov_article" + title: "Cgov Article, Testing Embedded Raw HTML Blocks - English " + title__ES: + value: "Cgov Article, Testing Embedded Raw HTML Blocks - Spanish" + langcode: en + status: 1 + field_site_section: + - '#process': + callback: 'reference' + args: + - 'taxonomy_term' + - vid: 'cgov_site_sections' + computed_path: '/test' + field_site_section__ES: + - '#process': + callback: 'reference' + args: + - 'taxonomy_term' + - vid: 'cgov_site_sections' + computed_path: '/test-es' + field_pretty_url: + value: 'cgov-article-testing-embedded-raw-html-blocks' + field_pretty_url__ES: + value: 'cgov-article-testing-embedded-raw-html-blocks-es' + moderation_state: + value: 'published' + field_article_body: + - entity: 'paragraph' + type: "body_section" + field_body_section_content: + - format: "ncids_full_html" + value: | +Lorem ipsum dolor sit amet, consectetur adipiscing elit. + Sed vobis voluptatum perceptarum recordatio vitam beatam facit, + et quidem corpore perceptarum. Tum Quintus: Est plane, Piso, + ut dicis, inquit.
+Primum cur ista res digna odio est, nisi quod est turpis? + Duo Reges: constructio interrete. Rhetorice igitur, inquam, + nos mavis quam dialectice disputare?
+ +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vobis voluptatum + perceptarum recordatio vitam beatam facit, et quidem corpore perceptarum. Tum Quintus: Est plane, Piso, ut dicis, inquit.
+Primum cur ista res digna odio est, nisi quod est turpis? Duo Reges: + constructio interrete. Rhetorice igitur, inquam, nos mavis quam dialectice disputare?
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vobis voluptatum + perceptarum recordatio vitam beatam facit, et quidem corpore perceptarum. + Tum Quintus: Est plane, Piso, ut dicis, inquit.
+Primum cur ista res digna odio est, nisi quod est turpis? + Duo Reges: constructio interrete. Rhetorice igitur, inquam, nos mavis quam dialectice disputare?
+ +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vobis voluptatum + perceptarum recordatio vitam beatam facit, et quidem corpore perceptarum. + Tum Quintus: Est plane, Piso, ut dicis, inquit.
+Primum cur ista res digna odio est, nisi quod est turpis? Duo Reges: + constructio interrete. Rhetorice igitur, inquam, nos mavis quam dialectice disputare?
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vobis voluptatum perceptarum + recordatio vitam beatam facit, et quidem corpore perceptarum. Tum Quintus: Est plane, Piso, ut dicis, inquit.
+Primum cur ista res digna odio est, nisi quod est turpis? + Duo Reges: constructio interrete. Rhetorice igitur, inquam, nos mavis quam dialectice disputare?
+ +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vobis voluptatum + perceptarum recordatio vitam beatam facit, et quidem corpore perceptarum. + Tum Quintus: Est plane, Piso, ut dicis, inquit.
+Primum cur ista res digna odio est, nisi quod est turpis? Duo Reges: + constructio interrete. Rhetorice igitur, inquam, nos mavis quam dialectice disputare?
+ field_article_body__ES: + - entity: 'paragraph' + type: "body_section" + field_body_section_content: + - format: "ncids_full_html" + value: | +SPANISH Paragraph
+ - entity: 'paragraph' + type: "body_section" + field_body_section_content: + - format: "ncids_full_html" + value: | +SPANISH Paragraph 2
+ field_browser_title: + value: "This is the Testing Embedded Content and Raw HTML Blocks Article Browser Title" + field_feature_card_description: + value: "This is a feature card description" + field_card_title: + value: "Basic Article Title English" + field_date_display_mode: + - value: 'posted' + - value: 'reviewed' + - value: 'updated' + field_page_description: + value: "This is the Meta Description AKA Page Description" + field_date_posted: + value: "2014-11-10" + field_date_reviewed: + value: "2012-12-10" + field_date_updated: + value: "2018-02-10" diff --git a/docroot/profiles/custom/cgov_site/themes/custom/ncids_trans/ncids_trans.theme b/docroot/profiles/custom/cgov_site/themes/custom/ncids_trans/ncids_trans.theme index aaec0b2245..31881a94d6 100644 --- a/docroot/profiles/custom/cgov_site/themes/custom/ncids_trans/ncids_trans.theme +++ b/docroot/profiles/custom/cgov_site/themes/custom/ncids_trans/ncids_trans.theme @@ -171,6 +171,21 @@ function ncids_trans_theme_suggestions_field_alter(array &$suggestions, array $v $suggestions[] = 'field__' . $element['#field_name'] . '__' . $element['#view_mode']; } +/** + * Implements hook_theme_suggestions_HOOK(). + * + * Add theme suggestions for entity embed container. + */ +function ncids_trans_theme_suggestions_entity_embed_container_alter(array &$suggestions, array $variables) { + if (empty($variables['element']['entity']['#block_content'])) { + return $suggestions; + } + $block_content = $variables['element']['entity']['#block_content']; + $suggestions[] = 'entity_embed_container__block_content__' . $block_content->bundle(); + + return $suggestions; +} + /** * Implements hook_preprocess_html(). * diff --git a/docroot/profiles/custom/cgov_site/themes/custom/ncids_trans/templates/entity_embed_container/entity-embed-container--block-content--content-block.html.twig b/docroot/profiles/custom/cgov_site/themes/custom/ncids_trans/templates/entity_embed_container/entity-embed-container--block-content--content-block.html.twig new file mode 100644 index 0000000000..066bd4dad9 --- /dev/null +++ b/docroot/profiles/custom/cgov_site/themes/custom/ncids_trans/templates/entity_embed_container/entity-embed-container--block-content--content-block.html.twig @@ -0,0 +1,30 @@ +{# +/** + * @file + * Default theme implementation of a container used to wrap embedded entities. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - children: The rendered child elements of the container. + * + * @see template_preprocess_entity_embed_container() + * + * @ingroup themeable + */ +#} +{% set data_entity_embed_display = attributes['data-entity-embed-display']|lower %} +{% set feature_card_string = 'feature_card' %} +{% if data_entity_embed_display is defined and +feature_card_string in data_entity_embed_display %} + {% set embed_class = 'cgdp-embed-feature-card' %} +{% else %} + {% set embed_class = '' %} +{% endif %} +{% if attributes['data-embed-button'] is defined and +attributes['data-embed-button'] == 'insert_block_content' %} +