Recently I have installed layout options module But no options shown in either layout builder UI in drupal . also tried with layout_paragraphs module .
I have custom layout registered.
and also added my_module.layout_options.yml
First i tried with options ui module . it did not work.
then i added class in my layout definition according to module documentation. did not worked either .
Drupal version : 10
layout_options : 1.2
php : 8.1
mariadb : 10.6
--mymodule.layouts.yml
mymodule_layouts_one_column:
label: 'One Column'
category: 'mymodule Layouts'
path: layouts/one_column
template: one-column
class: '\Drupal\layout_options\Plugin\Layout\LayoutOptions'
library: mymodule_layouts/one_column
regions:
column_one:
label: column one
icon_map:
- [column_one]
mymodule_layouts_two_column:
label: 'Two Column'
category: 'mymodule Layouts'
path: layouts/two_column
template: two-column
class: '\Drupal\layout_options\Plugin\Layout\LayoutOptions'
library: mymodule_layouts/two_column
regions:
column_one:
label: column one
column_two:
label: column two
icon_map:
- [column_one, column_two]
mymodule_layouts_three_column:
label: 'Three Column'
category: 'mymodule Layouts'
path: layouts/three_column
template: three-column
class: '\Drupal\layout_options\Plugin\Layout\LayoutOptions'
library: mymodule_layouts/three_column
regions:
column_one:
label: column one
column_two:
label: column two
column_three:
label: column three
icon_map:
- [column_one, column_two, column_three]
mymodule_layouts_four_column:
label: 'Four Column'
category: 'mymodule Layouts'
path: layouts/four_column
template: four-column
class: '\Drupal\layout_options\Plugin\Layout\LayoutOptions'
library: mymodule_layouts/four_column
regions:
column_one:
label: column one
column_two:
label: column two
column_three:
label: column three
column_four:
label: column four
icon_map:
- [column_one, column_two, column_three, column_four]
and mymodule_layouts_layout_options.yml
# This is an example of a [provider].layout_options.yml file.
# Replace provider with your module or theme name.
# This should be in the root directory of your module or theme.
# The settings here only apply if the layouts are using the
# \Drupal\layout_options\Plugin\Layout\LayoutOptions layout plugin.
#
#
# This section defines the options that are available to configure layouts
#
layout_option_definitions:
#
# This defines an id attribute option using the layout_options_id plugin.
#
layout_id:
title: 'Id attribute'
description: 'The CSS identifier to use on this layout item.'
default: ''
plugin: layout_options_id
layout: true
regions: true
weight: -100 #optional attribute to set form location.
layout_bg_color:
title: 'Background color'
description: 'The background color to use with this layout item.'
default: ''
plugin: layout_options_class_select
multi: false
options:
bg-info: 'Info'
bg-primary: 'Primary'
bg-secondary: 'Secondary'
bg-success: 'Success'
bg-white: 'White'
bg-transparent: 'Transparent'
layout: true
regions: true
weight: -90
layout_design_classes:
title: 'Layout classes'
description: 'The theme design classes to use with this layout item.'
default: ''
plugin: layout_options_class_checkboxes
inline: true
options:
layout--no-spacing: 'No Padding/Margin'
layout--narrow-spacing: 'Narrow spacing'
layout--small-width-image: 'Small Width Image'
layout--full-width-img: 'Full Width Image'
layout: true
regions: true
layout_custom_classes:
title: 'Custom classes'
description: 'Any custom classes to use with this layout item.'
default: ''
plugin: layout_options_class_string
layout: true
regions: true
layout_options:
global:
layout_bg_color: {}
layout_custom_classes: {}
layout_id: {}
Is there anything i have done wrong