In the Drupal 8 item-list.html.twig there is an list_style variable, this is not set in the build function of a facet in WidgetPluginBase.php on line 63. Via the context array its possible to add the list style. The list style is set by an setting in a facet. See attached patch for a fixed. Would love a review.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markkes created an issue. See original summary.

markkes’s picture

FileSize
765 bytes
borisson_’s picture

Thanks for creating this issue, I have no idea what this does but I'll have a look at it soon.

markkes’s picture

By setting the list_style via the context in the build of the item-list the class gets passed into the twig template. See: core/modules/system/templates/item-list.html.twig on line 25. Check it out, would like to hear what you think.

jefuri’s picture

Version: 8.x-1.0-alpha6 » 8.x-1.x-dev
FileSize
781 bytes

Recreated the patch from markkes by using the correct drupal patch flow for contribs.

Status: Needs review » Needs work

The last submitted patch, 5: facets-list_style_context-2841041-5.patch, failed testing.

  • borisson_ committed eddd2d0 on 8.x-1.x authored by jbertoen
    Issue #2841041 by markkes, jbertoen: List style is not set by context in...
borisson_’s picture

Status: Needs work » Fixed

Thanks! Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.