mirror of
https://gitlab.unicamp.br/infimecc_drupal11_modules/structural_pages.git
synced 2026-05-05 00:30:40 -03:00
Adiciona field_menu_title e field_weight ao content_page
field_menu_title (string, 128 chars): - Título alternativo para exibição no menu de navegação - Quando preenchido, substitui o título da página no menu - Útil para abreviar títulos longos field_weight (integer, padrão 0): - Controla a ordenação de páginas com o mesmo pai - Valores menores aparecem primeiro; empate resolvido por título StructuralPagesMenuBlock: - Ordenação: field_weight ASC, título ASC (antes: só título) - Título no menu: field_menu_title se preenchido, senão label() Update 10014: cria os campos e atualiza o form display em instalações existentes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,9 +4,11 @@ status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.field.node.content_page.body
|
||||
- field.field.node.content_page.field_menu_title
|
||||
- field.field.node.content_page.field_parent_page
|
||||
- field.field.node.content_page.field_redirect_link
|
||||
- field.field.node.content_page.field_site_section
|
||||
- field.field.node.content_page.field_weight
|
||||
- node.type.content_page
|
||||
module:
|
||||
- dynamic_entity_reference
|
||||
@@ -81,6 +83,21 @@ content:
|
||||
size: 60
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
field_menu_title:
|
||||
type: string_textfield
|
||||
weight: 1
|
||||
region: content
|
||||
settings:
|
||||
size: 60
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
field_weight:
|
||||
type: number
|
||||
weight: 27
|
||||
region: content
|
||||
settings:
|
||||
placeholder: '0'
|
||||
third_party_settings: { }
|
||||
uid:
|
||||
type: entity_reference_autocomplete
|
||||
weight: 5
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
langcode: pt-br
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.node.field_menu_title
|
||||
- node.type.content_page
|
||||
entity_type: node
|
||||
field_name: field_menu_title
|
||||
bundle: content_page
|
||||
label: 'Título no menu'
|
||||
description: 'Título abreviado para o menu de navegação. Se vazio, usa o título da página.'
|
||||
required: false
|
||||
translatable: true
|
||||
default_value: {}
|
||||
default_value_callback: ''
|
||||
settings: {}
|
||||
field_type: string
|
||||
@@ -0,0 +1,22 @@
|
||||
langcode: pt-br
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.node.field_weight
|
||||
- node.type.content_page
|
||||
entity_type: node
|
||||
field_name: field_weight
|
||||
bundle: content_page
|
||||
label: 'Peso (ordenação)'
|
||||
description: 'Valores menores aparecem primeiro entre páginas com o mesmo pai. Padrão: 0.'
|
||||
required: false
|
||||
translatable: false
|
||||
default_value:
|
||||
- value: 0
|
||||
default_value_callback: ''
|
||||
settings:
|
||||
min: ''
|
||||
max: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
field_type: integer
|
||||
17
config/install/field.storage.node.field_menu_title.yml
Normal file
17
config/install/field.storage.node.field_menu_title.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies: {}
|
||||
entity_type: node
|
||||
field_name: field_menu_title
|
||||
type: string
|
||||
settings:
|
||||
max_length: 128
|
||||
is_ascii: false
|
||||
case_sensitive: false
|
||||
module: core
|
||||
locked: false
|
||||
cardinality: 1
|
||||
translatable: true
|
||||
indexes: {}
|
||||
persist_with_no_fields: false
|
||||
custom_storage: false
|
||||
16
config/install/field.storage.node.field_weight.yml
Normal file
16
config/install/field.storage.node.field_weight.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies: {}
|
||||
entity_type: node
|
||||
field_name: field_weight
|
||||
type: integer
|
||||
settings:
|
||||
unsigned: false
|
||||
size: normal
|
||||
module: core
|
||||
locked: false
|
||||
cardinality: 1
|
||||
translatable: false
|
||||
indexes: {}
|
||||
persist_with_no_fields: false
|
||||
custom_storage: false
|
||||
Reference in New Issue
Block a user