- Issue created by @thomas.frobieter
- Status changed to Closed: works as designed
over 1 year ago 9:29pm 4 September 2023 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Yes, this is supported natively by the Symfony YAML parser
You can define a reference using the & symbol, e.g. this at the top of your file defines a 'spacing' variant.
spacing: &spacing label: 'Spacing' require: true default: 'section' options: 'section--no-padding': 'None' 'section--half-padding': 'Small' 'section': 'Large'
Then you can use that in your definitions like so:
one_column: label: One column category: Layouts template: layouts/one-column classes: spacing: <<: *spacing
- Status changed to Active
over 1 year ago 7:33am 5 September 2023 - π©πͺGermany Anybody Porta Westfalica
Thanks @larowlan - I never saw that before, very nice!
I guess others also might not be aware of this method. @thomas.frobieter perhaps it would make sense to prepare a MR with a README.md entry with this example for the module?
Or should it be added to the module description (page) @larowlan?
Even if this isn't something the module provides itselt, I think it would be useful to have an example and a link to the docs here?
Should we use this thread as a starting point for some module docs in general? Feedback please :)
And thank you very much for this hidden achievement again ;)
- π©πͺGermany Anybody Porta Westfalica
- Status changed to Fixed
over 1 year ago 3:31am 7 September 2023 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Added to Reusing definitions on the project page
- π©πͺGermany Anybody Porta Westfalica
Thank you very very much @larowlan! :)
Automatically closed - issue fixed for 2 weeks with no activity.