When I configure a Flexible layout row, I want to add an id
attribute for the row. Setting an ID would allow linking to a row using a URL fragment. Example:
- Row:
<section id="about" ...>
- Link:
<a href="#about" ...>
The custom ID would be very helpful building one pager websites or landing pages where navigation links point to different sections of the same page.
At the moment, it's possible to add a Region name and an Additional row class via the "Configure row" dialog. I suggest to also provide the option for a custom ID.
Alternatives that have been considered I didn't find a way to set custom IDs via the Flexible layout template or via the configuration file of a Flexible layout.
Recent comments
I agree with BWPanda about the better way to add a filter. As for your general question on how to add an array to a config file (which gets stored as json), have you tried: $config = config('...
How to programmatically insert an array into config file
I think that directly editing config is rarely, if ever, the best way to do something... Perhaps try loading a format (with it's filters) using filter_format_load(), add the new filter array (by...
How to programmatically insert an array into config file
My initial goal was to create a menu item that linked to a view that I had configured and that was being created on installation of the module, by including the view config file. To do this, I just...
How to programmatically create a menu link