Skip to content

Commit

Permalink
[OYB-3] Added Landing Page with Layout Builder content type.
Browse files Browse the repository at this point in the history
  • Loading branch information
duozersk committed Mar 31, 2020
1 parent 285b660 commit e2e5896
Show file tree
Hide file tree
Showing 15 changed files with 356 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/custom/openy_data_wrapper/src/DataWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function getPins($type, $id = NULL) {
'lat' => round($coordinates[0]['lat'], 5),
'lng' => round($coordinates[0]['lng'], 5),
'name' => $location->label(),
'markup' => $this->renderer->renderRoot($view),
'markup' => $this->renderer->render($view),
];
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
langcode: en
status: true
dependencies:
config:
- field.field.node.lplb.field_meta_tags
- field.field.node.lplb.layout_builder__layout
- node.type.lplb
module:
- metatag
- path
- scheduler
id: node.lplb.default
targetEntityType: node
bundle: lplb
mode: default
content:
addthis:
type: boolean_checkbox
settings:
display_label: true
weight: 16
region: content
third_party_settings: { }
created:
type: datetime_timestamp
weight: 10
region: content
settings: { }
third_party_settings: { }
field_meta_tags:
weight: 121
settings: { }
third_party_settings: { }
type: metatag_firehose
region: content
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
path:
type: path
weight: 30
region: content
settings: { }
third_party_settings: { }
promote:
type: boolean_checkbox
settings:
display_label: true
weight: 15
region: content
third_party_settings: { }
publish_on:
type: datetime_timestamp_no_default
weight: 30
region: content
settings: { }
third_party_settings: { }
redirect:
type: string_textfield
weight: 30
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
scheduler_settings:
weight: 20
settings: { }
third_party_settings: { }
region: content
status:
type: boolean_checkbox
settings:
display_label: true
weight: 120
region: content
third_party_settings: { }
sticky:
type: boolean_checkbox
settings:
display_label: true
weight: 16
region: content
third_party_settings: { }
title:
type: string_textfield
weight: -5
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
uid:
type: entity_reference_autocomplete
weight: 5
settings:
match_operator: CONTAINS
size: 60
placeholder: ''
match_limit: 10
region: content
third_party_settings: { }
unpublish_on:
type: datetime_timestamp_no_default
weight: 30
region: content
settings: { }
third_party_settings: { }
url_redirects:
weight: 50
settings: { }
third_party_settings: { }
region: content
hidden:
layout_builder__layout: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
langcode: en
status: true
dependencies:
config:
- field.field.node.lplb.field_meta_tags
- field.field.node.lplb.layout_builder__layout
- node.type.lplb
module:
- layout_builder
- layout_discovery
- metatag
- user
third_party_settings:
layout_builder:
allow_custom: true
enabled: true
sections:
-
layout_id: layout_onecol
layout_settings:
label: ''
components: { }
third_party_settings: { }
id: node.lplb.default
targetEntityType: node
bundle: lplb
mode: default
content:
addthis:
label: hidden
type: string
weight: 100
region: content
settings:
link_to_entity: false
third_party_settings: { }
field_meta_tags:
weight: 101
label: above
settings: { }
third_party_settings: { }
type: metatag_empty_formatter
region: content
links:
weight: 100
settings: { }
third_party_settings: { }
region: content
hidden:
langcode: true
layout_builder__layout: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.node.teaser
- field.field.node.lplb.field_meta_tags
- field.field.node.lplb.layout_builder__layout
- node.type.lplb
module:
- user
id: node.lplb.teaser
targetEntityType: node
bundle: lplb
mode: teaser
content:
addthis:
label: hidden
type: string
weight: 100
region: content
settings:
link_to_entity: false
third_party_settings: { }
links:
weight: 100
settings: { }
third_party_settings: { }
region: content
hidden:
field_meta_tags: true
langcode: true
layout_builder__layout: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_meta_tags
- node.type.lplb
module:
- datalayer
- metatag
third_party_settings:
datalayer:
expose: 0
label: field_meta_tags
id: node.lplb.field_meta_tags
field_name: field_meta_tags
entity_type: node
bundle: lplb
label: 'Meta Tags'
description: 'A Meta Tags provides metadata about some aspect of the contents of a Web page. <br/> The metadata can be used by browsers, search engines, or other web services as Facebook, Pinterest, LinkedIn and other social networking sites.'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings: { }
field_type: metatag
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
langcode: en
status: true
dependencies:
config:
- field.storage.node.layout_builder__layout
- node.type.lplb
module:
- layout_builder
id: node.lplb.layout_builder__layout
field_name: layout_builder__layout
entity_type: node
bundle: lplb
label: Layout
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: layout_section
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
langcode: en
status: true
dependencies:
module:
- layout_builder
- node
id: node.layout_builder__layout
field_name: layout_builder__layout
entity_type: node
type: layout_section
settings: { }
module: layout_builder
locked: true
cardinality: 1
translatable: false
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
langcode: en
status: true
dependencies:
config:
- node.type.lplb
id: node.lplb
target_entity_type_id: node
target_bundle: lplb
default_langcode: site_default
language_alterable: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
langcode: en
status: true
dependencies:
module:
- menu_ui
- scheduler
third_party_settings:
menu_ui:
available_menus:
- main
parent: 'main:'
scheduler:
expand_fieldset: always
fields_display_mode: vertical_tab
publish_enable: true
publish_past_date: publish
publish_required: false
publish_revision: false
publish_touch: false
unpublish_enable: true
unpublish_required: false
unpublish_revision: false
name: 'Landing Page with Layout Builder'
type: lplb
description: 'Landing Page content type is used for adding Landing Pages on the site.'
help: ''
new_revision: true
preview_mode: 1
display_submitted: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
langcode: en
status: true
dependencies:
module:
- node
id: landing_page_with_layout_builder
label: 'Landing Page with Layout Builder'
type: 'canonical_entities:node'
pattern: '[node:title]'
selection_criteria:
1b51ace7-8871-478f-beb8-4ed3a9367ea0:
id: node_type
bundles:
lplb: lplb
negate: false
context_mapping:
node: node
uuid: 1b51ace7-8871-478f-beb8-4ed3a9367ea0
selection_logic: and
weight: -5
relationships: { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
index: true
priority: '0.5'
changefreq: ''
include_images: false
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
required: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Open Y Node Landing Page with Layout Builder'
description: 'Provides a Landing Page with Layout Builder content type.'
type: module
core: 8.x
dependencies:
- datalayer
- field
- language
- layout_builder
- layout_discovery
- menu_ui
- metatag
- node
- openy_node
- path
- pathauto
- scheduler
- simple_sitemap
- user
version: 8.x-1.0
core_incompatible: false
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function openy_prgf_amenities_form_views_exposed_form_alter(&$form, FormStateInt
}
foreach ($form['field_location_amenities_target_id']['#options'] as $key => $option) {
$form['field_location_amenities_target_id']['#options'][$key] =
\Drupal::service('renderer')->renderRoot($amenities_view[$key]);
\Drupal::service('renderer')->render($amenities_view[$key]);
}
}
}
1 change: 1 addition & 0 deletions openy.packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ editorial_ext:
- openy_prgf_featured_content
- openy_prgf_lto
- openy_prgf_secondary_description_sidebar
- openy_node_lplb

editorial_adv:
name: 'Editorial Advanced'
Expand Down

0 comments on commit e2e5896

Please sign in to comment.