Create a block of testimonials
Sorted by weight, added using the Weight module. https://www.drupal.org/project/weight If two testimonials have the same weight, they are sorted by their created date.
This commit is contained in:
parent
b8ca93ff2b
commit
cfb98aea2f
15 changed files with 381 additions and 14 deletions
|
@ -7,6 +7,7 @@ dependencies:
|
|||
- field.field.node.testimonial.field_image
|
||||
- field.field.node.testimonial.field_role
|
||||
- field.field.node.testimonial.field_url
|
||||
- field.field.node.testimonial.field_weight
|
||||
- image.style.thumbnail
|
||||
- node.type.testimonial
|
||||
module:
|
||||
|
@ -14,6 +15,7 @@ dependencies:
|
|||
- link
|
||||
- path
|
||||
- text
|
||||
- weight
|
||||
id: node.testimonial.default
|
||||
targetEntityType: node
|
||||
bundle: testimonial
|
||||
|
@ -59,6 +61,12 @@ content:
|
|||
placeholder_url: ''
|
||||
placeholder_title: ''
|
||||
third_party_settings: { }
|
||||
field_weight:
|
||||
type: weight_selector
|
||||
weight: 123
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
path:
|
||||
type: path
|
||||
weight: 30
|
||||
|
|
|
@ -7,13 +7,15 @@ dependencies:
|
|||
- field.field.node.testimonial.field_image
|
||||
- field.field.node.testimonial.field_role
|
||||
- field.field.node.testimonial.field_url
|
||||
- image.style.wide
|
||||
- field.field.node.testimonial.field_weight
|
||||
- image.style.thumbnail
|
||||
- node.type.testimonial
|
||||
module:
|
||||
- image
|
||||
- link
|
||||
- text
|
||||
- user
|
||||
- weight
|
||||
id: node.testimonial.default
|
||||
targetEntityType: node
|
||||
bundle: testimonial
|
||||
|
@ -31,9 +33,9 @@ content:
|
|||
label: hidden
|
||||
settings:
|
||||
image_link: ''
|
||||
image_style: wide
|
||||
image_style: thumbnail
|
||||
image_loading:
|
||||
attribute: eager
|
||||
attribute: lazy
|
||||
third_party_settings: { }
|
||||
weight: -1
|
||||
region: content
|
||||
|
@ -57,6 +59,13 @@ content:
|
|||
third_party_settings: { }
|
||||
weight: 102
|
||||
region: content
|
||||
field_weight:
|
||||
type: default_weight
|
||||
label: above
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
weight: 103
|
||||
region: content
|
||||
links:
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
|
|
|
@ -8,6 +8,7 @@ dependencies:
|
|||
- field.field.node.testimonial.field_image
|
||||
- field.field.node.testimonial.field_role
|
||||
- field.field.node.testimonial.field_url
|
||||
- field.field.node.testimonial.field_weight
|
||||
- image.style.medium
|
||||
- node.type.testimonial
|
||||
module:
|
||||
|
@ -46,3 +47,4 @@ content:
|
|||
hidden:
|
||||
field_role: true
|
||||
field_url: true
|
||||
field_weight: true
|
||||
|
|
|
@ -73,6 +73,7 @@ module:
|
|||
update: 0
|
||||
user: 0
|
||||
views_ui: 0
|
||||
weight: 0
|
||||
yoast_seo: 0
|
||||
pathauto: 1
|
||||
views: 10
|
||||
|
|
24
config/sync/field.field.node.testimonial.field_weight.yml
Normal file
24
config/sync/field.field.node.testimonial.field_weight.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
uuid: 439fa0fe-e67a-4ea2-9459-c6407159086f
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.node.field_weight
|
||||
- node.type.testimonial
|
||||
module:
|
||||
- weight
|
||||
id: node.testimonial.field_weight
|
||||
field_name: field_weight
|
||||
entity_type: node
|
||||
bundle: testimonial
|
||||
label: Weight
|
||||
description: ''
|
||||
required: true
|
||||
translatable: false
|
||||
default_value:
|
||||
-
|
||||
value: '0'
|
||||
default_value_callback: ''
|
||||
settings:
|
||||
range: '20'
|
||||
field_type: weight
|
20
config/sync/field.storage.node.field_weight.yml
Normal file
20
config/sync/field.storage.node.field_weight.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
uuid: c6c510a1-7a57-4fba-b424-ff817e152c1f
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
- weight
|
||||
id: node.field_weight
|
||||
field_name: field_weight
|
||||
entity_type: node
|
||||
type: weight
|
||||
settings:
|
||||
unsigned: false
|
||||
module: weight
|
||||
locked: false
|
||||
cardinality: 1
|
||||
translatable: true
|
||||
indexes: { }
|
||||
persist_with_no_fields: false
|
||||
custom_storage: false
|
206
config/sync/views.view.testimonials.yml
Normal file
206
config/sync/views.view.testimonials.yml
Normal file
|
@ -0,0 +1,206 @@
|
|||
uuid: cb653bfe-32b2-4454-ab25-19244ee2b180
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- core.entity_view_mode.node.full
|
||||
- node.type.testimonial
|
||||
module:
|
||||
- node
|
||||
- user
|
||||
id: testimonials
|
||||
label: Testimonials
|
||||
module: views
|
||||
description: ''
|
||||
tag: ''
|
||||
base_table: node_field_data
|
||||
base_field: nid
|
||||
display:
|
||||
default:
|
||||
id: default
|
||||
display_title: Default
|
||||
display_plugin: default
|
||||
position: 0
|
||||
display_options:
|
||||
title: Testimonials
|
||||
fields:
|
||||
title:
|
||||
id: title
|
||||
table: node_field_data
|
||||
field: title
|
||||
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: 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: 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: some
|
||||
options:
|
||||
offset: 0
|
||||
items_per_page: 5
|
||||
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: perm
|
||||
options:
|
||||
perm: 'access content'
|
||||
cache:
|
||||
type: tag
|
||||
options: { }
|
||||
empty: { }
|
||||
sorts:
|
||||
field_weight_value:
|
||||
id: field_weight_value
|
||||
table: node__field_weight
|
||||
field: field_weight_value
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
plugin_id: standard
|
||||
order: ASC
|
||||
expose:
|
||||
label: ''
|
||||
field_identifier: ''
|
||||
exposed: false
|
||||
created:
|
||||
id: created
|
||||
table: node_field_data
|
||||
field: created
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
entity_type: node
|
||||
entity_field: created
|
||||
plugin_id: date
|
||||
order: DESC
|
||||
expose:
|
||||
label: ''
|
||||
field_identifier: ''
|
||||
exposed: false
|
||||
granularity: second
|
||||
arguments: { }
|
||||
filters:
|
||||
status:
|
||||
id: status
|
||||
table: node_field_data
|
||||
field: status
|
||||
entity_type: node
|
||||
entity_field: status
|
||||
plugin_id: boolean
|
||||
value: '1'
|
||||
group: 1
|
||||
expose:
|
||||
operator: ''
|
||||
type:
|
||||
id: type
|
||||
table: node_field_data
|
||||
field: type
|
||||
entity_type: node
|
||||
entity_field: type
|
||||
plugin_id: bundle
|
||||
value:
|
||||
testimonial: testimonial
|
||||
style:
|
||||
type: default
|
||||
row:
|
||||
type: 'entity:node'
|
||||
options:
|
||||
relationship: none
|
||||
view_mode: full
|
||||
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'
|
||||
- 'user.node_grants:view'
|
||||
- user.permissions
|
||||
tags: { }
|
||||
block_1:
|
||||
id: block_1
|
||||
display_title: Block
|
||||
display_plugin: block
|
||||
position: 1
|
||||
display_options:
|
||||
display_extenders: { }
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- 'user.node_grants:view'
|
||||
- user.permissions
|
||||
tags: { }
|
Loading…
Add table
Add a link
Reference in a new issue