So sorry for a ticket, I've researched prior to this. I am looking for any support documentation to help me define a new custom 'Display Format' for Views in D8 Core.
There are several modules already out there that add new Views display formatters but I think I need my own custom one.
In all of my research there is a lot of talk about custom field formatters and custom filters but I don't think they are what I am looking for.
Any help finding documentation would be appreciated.
joe
Comments
Comment #2
lendudeMoving to the right queue.
Display formats are plugins of the type ViewsStyle.
As an example see the HTML list plugin (Drupal\views\Plugin\views\style\HtmlList, path is /core/modules/views/src/Plugin/views/style/HtmlList.php), or others styles in the same folder.
Not sure if there is more documentation about Views Styles specifically, but there should be some about creating plugins, and just copy/paste an existing style that gets close to your needs and mod it would be my recommendation.
Comment #3
heneryh commentedThanks Lendude, I'll continue my attempts but it hasn't gone well so far. My custom one isn't yet showing up in the list of available formatters. A suggestion would be to create a sample plug-in for how to provide a new ViewStyle, even if it is an exact copy of one of the built-in ones.
edit, I see that adding samples is already on the todo list https://api.drupal.org/api/drupal/core!modules!views!views.api.php/group...
Comment #12
marcelovaniI had to create one today, does this answer the question? https://www.drupal.org/node/1578452
and https://www.drupal.org/docs/creating-custom-modules/building-a-views-dis...
Comment #15
cilefen commentedI am closing this support request because there have been no recent comments.