Closed (fixed)
Project:
Voting API Reaction
Version:
8.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Feb 2022 at 02:33 UTC
Updated:
11 May 2023 at 05:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jaydee1818 commentedComment #3
elamanPlease read the module's description.
It describes that `votingapi-reaction-item.html.twig` allows you to control how info is displayed. The vote count is displayed in a div with votingapi-reaction-count class. However, you can edit the twig file to do it any way you want.
Comment #4
jaydee1818 commentedHi elaman - please take another look as the template file you have indicated only works on the individual widgets. I have added some images to help explain.
Comment #5
jaydee1818 commentedComment #6
elamanHi, @jaydee1818. The total count is displayed as a part of a simple form. In drupal, you can theme any form in your custom theme.
https://www.drupal.org/forum/support/module-development-and-code-questio...
Comment #7
jaydee1818 commentedOK no worries - I just thought it would be helpful to have some default HTML wrapped around that string so it's more easily themable with only css and not needing to write PHP to alter it.
Comment #8
jaydee1818 commentedI found that I also had to make the change to the submitForm function.
Comment #9
elamanFixed by changing the count element to item, now it should have classes provided by Drupal FormElement.