commas and +
Issue #4
new
Hi Fabian
It was great to see you on the Concrete5 Town Hall earlier on in the week. Congratulations on being on the Core Team!
I'm using your great add on and have a question. Is there a way to be able to format the number displayed so that it has comma separators so 60000 is viewed as 60,000? Related to this is that we want indicate that the number isn't that exact number as stats are always changing. Is there a way to be able to have a + sign at the end of certain stats?
Thanks
Justyn
Comments (3)
-
repo owner -
repo owner -
Really helpful. Thank you.
- Log in to comment
Hi Justyn and thank you!
You can create a custom template for that. Just copy the view.php from the counter block to app directory see https://documentation.concrete5.org/developers/working-with-blocks/working-with-existing-block-types/modifying-the-default-view-template-for-a-core-block-type
For adding the dots you can use php number_format
Same for the plus icon you can add it to the block template html markup.
Hope that helps
Fabian