“mfe-dockerfile-post-npm-install-account”,
“”"
RUN npm install ‘@edx/brand@git+https://github.com/allenluna/VXI_Brand-OpenEdx.git#main’
“”"
),
am i doing right? seems not working, or I just need to remove the @edx/brand@git?
after saving I did tutor images build mfe --no-cache followed by tutor local stop and start
i need to customize my tutor local openedx header to show 2 logos nearby
so i have done cloning this repo and make changes in Logo.jsx and created a plugin file and it install my git repo and uses my changes
but when i build the mfe with no cache it shows like the things from my git is installing
after build success the changes are not reflecting in the lms header as the default header is loading
why ? is there any other method for my requirement(2 logos on header)
someone please help if you know current version 20 + (teak version)
A more reliable approach is to create a plugin Python file that directly registers your custom React widget via the PLUGIN_SLOTS API. Here’s a working pattern you can follow:
import os
from tutormfe.hooks import MFE_APPS, PLUGIN_SLOTS
from tutor import hooks
# Path to your plugin directory
PLUGIN_DIR = os.path.dirname(__file__)
# Example: Add a widget to the learner dashboard header
PLUGIN_SLOTS.add_item(
(
"learner-dashboard", # MFE you want to target
"desktop_main_menu_slot", # Slot you want to inject into
"""
{
op: PLUGIN_OPERATIONS.Insert,
widget: {
id: 'custom_header',
type: DIRECT_PLUGIN,
RenderWidget: () => <SomeComp />,
),
}
}
"""
)
)
Key points:
Replace "learner-dashboard" with the MFE where you want your logos to appear.
Example: "studio" or "all" if you want it everywhere.
Replace "desktop_main_menu_slot" with the slot you want to use in that MFE.
The RenderWidget can be a simple React component or inline JSX like above.
Make sure this Python plugin is picked up by Tutor by placing it in your plugin directory
but the thing is the /courses page is not getting the mfe pluginslot changes as per checking i found its a legacy page. so how can i customize the /courses page?
please give a solution
Hi, i have changed like this and installed plugin and after build and restart the changes are not getting reflected as the default indigo is getting loaded..
why ?
Hi @Abdul_Muqadim
i have customized the pages using plugin slots and it works but the /courses page is not getting the header and footer changes …
isn’t it a mfe app ? if not how to customize it ?
all my pages getting my custom header and footer through frontend plugin slots