lewisjenkins / craft-dynamic-fields

Populate Craft fields with dynamic data using the power of Twig.
Other
147 stars 10 forks source link

Add ability to display Dynamic Field columns in element index view tables. #42

Open benjaminkohl opened 2 years ago

benjaminkohl commented 2 years ago

I noticed that none of the dynamic fields we have set up on various entry types are listed as table column options in the element index views. I forget what all goes into registering a field type as a possible table attribute on an element index but this would be a great feature to add.

Craft 3.7.19 LJ Dynamic Fields 3.0.12

lewisjenkins commented 2 years ago

I will have a look at this, but in the meantime, you could possibly use a Preparse field to store and display the value in the element index views?

https://plugins.craftcms.com/preparse-field

benjaminkohl commented 2 years ago

It sounds like the bare minimum to get it to work automatically for custom fields is that the field types need to implement the craft\base\PreviewableFieldInterface interface. I had to ask on Discord because I was looking through the Craft source and nothing jumped out at me.