Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Enhancement] Add support to override indigo footer using plugin slot. (by @Faraz32123)
Related conversation: https://github.com/overhangio/tutor-indigo/pull/181#issuecomment-3834617842.
16 changes: 16 additions & 0 deletions tutorindigo/patches/mfe-env-config-runtime-final
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

if (config.pluginSlots && config.pluginSlots['org.openedx.frontend.layout.footer.v1']) {
const footerPluginsToInsert =
config.pluginSlots['org.openedx.frontend.layout.footer.v1'].plugins.filter(plugin => plugin.op === 'insert');

if (footerPluginsToInsert.length > 2) {
config.pluginSlots['org.openedx.frontend.layout.footer.v1'].plugins =
config.pluginSlots['org.openedx.frontend.layout.footer.v1'].plugins.filter(plugin => {
if (plugin.op === 'insert') {
const widgetId = plugin.widget?.id;
return widgetId !== 'indigo_footer';
}
return true;
});
}
}
2 changes: 1 addition & 1 deletion tutorindigo/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def _override_openedx_docker_image(
{
op: PLUGIN_OPERATIONS.Insert,
widget: {
id: 'custom_footer',
id: 'indigo_footer',
type: DIRECT_PLUGIN,
priority: 1,
RenderWidget: IndigoFooter,
Expand Down