Files
frontend-app-learning/src/plugin-slots/CourseBreadcrumbsSlot/README.md
2025-04-24 07:27:23 -04:00

1.0 KiB

Course Breadcrumbs Slot

Slot ID: org.openedx.frontend.learning.course_breadcrumbs.v1

Slot ID Aliases

  • course_breadcrumbs_slot

Description

This slot is used to replace/modify/hide the course breadcrumbs.

Example

Default content

Breadcrumbs slot with default content

Replaced with custom component

🍞 in breadcrumbs slot

The following env.config.jsx will replace the course breadcrumbs entirely.

import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';

const config = {
  pluginSlots: {
    'org.openedx.frontend.learning.course_breadcrumbs.v1': {
      keepDefault: false,
      plugins: [
        {
          op: PLUGIN_OPERATIONS.Insert,
          widget: {
            id: 'custom_breadcrumbs_component',
            type: DIRECT_PLUGIN,
            RenderWidget: () => (
              <h1>🍞</h1>
            ),
          },
        },
      ]
    }
  },
}

export default config;