Hi,
i have included facets summary block in a project with so much front en markup customization and i have found at least a big issue with themer experience. Current implementation of DefaultFacetsSummaryManager use this in build method:
$build = array(
'#theme' => 'item_list',
'#attributes' => array(
'data-drupal-facets-summary-id' => $facets_summary->id(),
),
);
i cannot customize markup of hole summary list to change UL tag or add classes to items. I cannot found a way to change it using preprocess_item_list or theme suggestion. I ended overriding DefaultFacetsSummaryManager service with a custom one to control this theme function. I think that is more flexible to use a custom theme twig file for this list.
Best!
David
Comment | File | Size | Author |
---|---|---|---|
#4 | add_template-2846343-4.patch | 4.09 KB | shkiper |
Comments
Comment #2
borisson_Thanks for reporting this issue. It sounds like a great plan to provide our own twig template.
Comment #3
borisson_Looks like this is the same thing as #2796143: Add a wrapping template but for summaries, so the same steps to success:
Comment #4
shkiper CreditAttribution: shkiper as a volunteer commentedComment #5
borisson_I think this is great; looks good! Not sure if we should add a test for this as well; writing a test for this would mean the same thing as writing a test for the theme system.
I'll keep this open for a few days to get opinions on the test in from others but setting it to RTBC in the meantime. @shkiper does this need a drupaldevdays tag?
Comment #6
borisson_Committed and pushed, thanks!