Drupal Front End - Views & SDCs Looking for Advice
Looking for some advice - I'm building a page that is designed to have a couple card groups as a staff directory page. I've built out the staff content type and the view with the pertinent fields and have the page built out using multiple template files and SDCs.
This is my flow and it just seems like I'm editing so many files - am I doing this the hardest way possible?
- Content Type -> Staff with general contact fields and an image field
- GUI View Module -> Builds the rows with pertinent fields from my content type (grouped by employee type taxonomy field)
- views-view--staff--block-1.html.twig [Template File] -> calls the subsequent SDC
- views-view—unformatted—staff-directory.twig [SDC] -> Builds the card group <div>, card containers (I.e. container width, padding, etc.), & calls {{ for row in rows }} ...
- views-view-fields--staff--block-1.html.twig [Template File]-> Includes the Card SDC for each row with { fields of interest from the view }
- Card [SDC]
It all works but seems like a lot of files to manipulate just to build a card group. Any help or suggestions would be appreciated.
[link] [comments]