Closed joachim-n closed 2 days ago
If I recall Directories doesn't create a display mode for new entry types. So this is something we want to extend anyway. How much this could be some template yml, how much needs to be code - because of unknown, or potentially missing, fields I'm not sure. I suspect we can just do our best, enabling the view mode.
Question: is the only view mode going to be the search input / output ones? I guess so. But could potentially be more than one.
If I recall Directories doesn't create a display mode for new entry types
Yeah, I think I filed a bug report about that!
Also, I'm confused about this in ConfigurationHelper:
protected function viewSetViewMode(ViewEntityInterface $view, string $entity_type_id, string $entity_bundle): void {
// Also set the default view mode for the directory view listing.
$display = $view->get('display');
if (isset($display['node_embed']['display_options']['row'])) {
$display['node_embed']['display_options']['row']['options']['view_modes']['entity:' . $entity_type_id][$entity_bundle] = 'teaser';
}
It's setting the view mode to teaser
, but the module provides search_result
view displays in config/install. Is that just because it's creating view displays for all the core view modes?
Two view modes:
Done.
In Directories, the view mode
search_result
is installed from config --config/install/core.entity_view_display.node.localgov_directory.search_result.yml
.If Finders base module is entity type-agnostic, we probably need to make that config installed from a template?