Hi,
We are trying to add parameters to the JSON used for the course module mustache code.
What we're trying to achieve
Our old theme displayed the pluginname i.e. Forum, Assignment, Page etc above the activity name, in the cmname.mustache file.

The current Boost version doesn't show this but we would like to re-add this feature. I can get something similar by adding:
{{#modname}} <div class="activitytype text-uppercase small">
<span>{{{modname}}}</span> </div>
to cmname.mustache under theme_name/templates/core_courseformat/local/content/cm/cmname.mustache. This works but I'm having to use modname not pluginname as it seems to be empty and modname is a shortened version of plugin name so assignment become assign which is not ideal.
We would also like to use the variable purpose in a different part of the course module to change the activities background colour. I can do this by adding:
'purpose' => plugin_supports('mod', $mod->modname, FEATURE_MOD_PURPOSE, MOD_PURPOSE_OTHER),To line 111 of cmitem.php in the core files but would rather be able to do this from the theme.
Things We've tried:
We've tried following the guidance on https://moodledev.io/docs/apis/plugintypes/format#creating-the-basic-output-structure but my output classes don't have any effect when run from inside my theme.
Does anyone have a working example of doing this to help me on my why or can suggest reasons why following the above links instructions in a theme would not work?
Many Thanks,
Jon