Add property plugin example usage

Created on 15 June 2024, 12 days ago

Problem/Motivation

I'm very interested in trying out the new Property plugin, but I'm not sure how to use it :)

(A follow-up to ✨ Add Property plugin Fixed )

My very, very rough guess so far got me this far -- and it does save a value, but, I don't think it's what I'm meant to do?

# my_theme.style_options.yml

options:
  aria_label:
    plugin: property
    label: 'ARIA label'
    multiple: false
contexts:
  paragraphs:
    button:
      options:
        aria_label: true

Steps to reproduce

N/A

Proposed resolution

Could you please add example usage to the example style options config YML file?
https://git.drupalcode.org/project/style_options/-/blob/1.1.x/example.st...

Also, if possible, a rec for the best way to access this value in a twig template? (I've gotten as far as staring blankly at {{ dd(paragraph.behavior_settings.0) }}, but I feel like that can't be it, there must be another way I'm meant to access this thing -- or, maybe it'll be clearer when I have it set up right.)

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States alison

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024