Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Article List Page: Expose Category/Tag Filter Toggle Setting #180

Merged
merged 4 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ dependencies:
- field.field.node.ucb_article_list.body
- field.field.node.ucb_article_list.field_ucb_exclude_category
- field.field.node.ucb_article_list.field_ucb_exclude_tag
- field.field.node.ucb_article_list.field_ucb_expose_category
- field.field.node.ucb_article_list.field_ucb_expose_tag
- field.field.node.ucb_article_list.field_ucb_filter_by_category
- field.field.node.ucb_article_list.field_ucb_filter_by_tag
- node.type.ucb_article_list
Expand All @@ -18,6 +20,7 @@ third_party_settings:
children:
- group_ucb_include_filter
- group_ucb_exclude_filter
- group_ucb_expose_filters
label: Filters
region: content
parent_name: ''
Expand Down Expand Up @@ -61,6 +64,23 @@ third_party_settings:
formatter: closed
description: ''
required_fields: true
group_ucb_expose_filters:
children:
- field_ucb_expose_category
- field_ucb_expose_tag
label: 'Expose Filters'
region: content
parent_name: group_ucb_filters
weight: 15
format_type: tab
format_settings:
classes: ''
show_empty_fields: false
id: ''
label_as_html: false
formatter: closed
description: ''
required_fields: true
id: node.ucb_article_list.default
targetEntityType: node
bundle: ucb_article_list
Expand Down Expand Up @@ -94,6 +114,20 @@ content:
region: content
settings: { }
third_party_settings: { }
field_ucb_expose_category:
type: boolean_checkbox
weight: 16
region: content
settings:
display_label: true
third_party_settings: { }
field_ucb_expose_tag:
type: boolean_checkbox
weight: 17
region: content
settings:
display_label: true
third_party_settings: { }
field_ucb_filter_by_category:
type: options_buttons
weight: 9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ dependencies:
- field.field.node.ucb_article_list.body
- field.field.node.ucb_article_list.field_ucb_exclude_category
- field.field.node.ucb_article_list.field_ucb_exclude_tag
- field.field.node.ucb_article_list.field_ucb_expose_category
- field.field.node.ucb_article_list.field_ucb_expose_tag
- field.field.node.ucb_article_list.field_ucb_filter_by_category
- field.field.node.ucb_article_list.field_ucb_filter_by_tag
- node.type.ucb_article_list
Expand Down Expand Up @@ -37,6 +39,26 @@ content:
third_party_settings: { }
weight: 105
region: content
field_ucb_expose_category:
type: boolean
label: hidden
settings:
format: true-false
format_custom_false: ''
format_custom_true: ''
third_party_settings: { }
weight: 106
region: content
field_ucb_expose_tag:
type: boolean
label: hidden
settings:
format: true-false
format_custom_false: ''
format_custom_true: ''
third_party_settings: { }
weight: 107
region: content
field_ucb_filter_by_category:
type: entity_reference_entity_id
label: hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ dependencies:
- field.field.node.ucb_article_list.body
- field.field.node.ucb_article_list.field_ucb_exclude_category
- field.field.node.ucb_article_list.field_ucb_exclude_tag
- field.field.node.ucb_article_list.field_ucb_expose_category
- field.field.node.ucb_article_list.field_ucb_expose_tag
- field.field.node.ucb_article_list.field_ucb_filter_by_category
- field.field.node.ucb_article_list.field_ucb_filter_by_tag
- node.type.ucb_article_list
Expand Down Expand Up @@ -33,5 +35,7 @@ content:
hidden:
field_ucb_exclude_category: true
field_ucb_exclude_tag: true
field_ucb_expose_category: true
field_ucb_expose_tag: true
field_ucb_filter_by_category: true
field_ucb_filter_by_tag: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_ucb_expose_category
- node.type.ucb_article_list
id: node.ucb_article_list.field_ucb_expose_category
field_name: field_ucb_expose_category
entity_type: node
bundle: ucb_article_list
label: 'Show Category Filter'
description: 'Allow visitors to filter on Categories'
required: false
translatable: false
default_value:
-
value: 0
default_value_callback: ''
settings:
on_label: Show
off_label: Hide
field_type: boolean
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_ucb_expose_tag
- node.type.ucb_article_list
id: node.ucb_article_list.field_ucb_expose_tag
field_name: field_ucb_expose_tag
entity_type: node
bundle: ucb_article_list
label: 'Show Tag Filter'
description: 'Allow visitors to filter on Tags'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
on_label: Show
off_label: Hide
field_type: boolean
17 changes: 17 additions & 0 deletions config/install/field.storage.node.field_ucb_expose_category.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
langcode: en
status: true
dependencies:
module:
- node
id: node.field_ucb_expose_category
field_name: field_ucb_expose_category
entity_type: node
type: boolean
settings: { }
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
17 changes: 17 additions & 0 deletions config/install/field.storage.node.field_ucb_expose_tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
langcode: en
status: true
dependencies:
module:
- node
id: node.field_ucb_expose_tag
field_name: field_ucb_expose_tag
entity_type: node
type: boolean
settings: { }
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Loading