craft-linkfield icon indicating copy to clipboard operation
craft-linkfield copied to clipboard

FR: Add general config that can be used as a settings starter template

Open TomDeSmet opened this issue 3 years ago • 3 comments

This plugin is great and we use it all the time. A lot of those times we use it in our content builder matrix field. Every time we add this field we need to set the default settings for the field.

It would be sooooo great if we could have a config.php where we could set all the default settings for the link field and if needed overrule it by tweaking the settings inside the field itself.

Settings that we change regularly are: allow title, allow aria, set the default link type to entry, disable users, etc.

TomDeSmet avatar May 04 '21 13:05 TomDeSmet

Hi @TomDeSmet, it's great to hear that you like working with the plugin.

Actually this wish already came up (#47) and I've noted it on our wishlist (https://github.com/sebastian-lenz/craft-linkfield/blob/master/WISHLIST.md). The difficulty here is that we we would need to build an interface that allows declaring those settings somewhere which is quite some work. Additionally we would have to ensure that all future changes work well with this feature too.

sebastian-lenz avatar May 05 '21 19:05 sebastian-lenz

Well. I wouldn’t want a real CP interface tbh. I’d settle for a php config file much like matrix mate for example. As a start that config could be the setup for all link fields in a craft setup. Maybe later we could define multiple arrays or configs redactor style that we could choose on a per field basis. That was also an idea in #47 I believe.

But good that it is on the wishlist.

TomDeSmet avatar May 05 '21 19:05 TomDeSmet

Seconding this as well as not needing the settings in the CP... a config/linkfield.php file would be great!

robmcfadden avatar Oct 15 '21 14:10 robmcfadden