Override BadgesModule
Bleistivt
Moderator
To conform with my legacy award system I would like to group badges shown in the BadgesModule by rule.
Is there a non-invasive way I can override the badges module (or just the view) that comes with Yaga from a plugin?
0
Comments
You should be able to place a copy of
/applications/yaga/views/modules/badges.phpinto your theme at/themes/YourTheme/views/modules/badges.phpand modify it as you wish.If you just want to sort the data, that is coming in Yaga 1.1.
Awesome, totally forgot about theme overrides! That'll do too.
Just fyi, I found another way to switch out the modules, reusing the already fetched data:
public function ProfileController_Render_Before($Sender) { if (C('Yaga.Badges.Enabled')) { $Data = $Sender->Assets['Panel']['BadgesModule']->Data; unset($Sender->Assets['Panel']['BadgesModule']); $CustomBadgesModule = new CustomBadgesModule($Sender, $Data); $Sender->AddModule($CustomBadgesModule); } }