Skip to content

Latest commit

 

History

History

CourseOutlineMobileSidebarTriggerSlot

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Course Outline Mobile Sidebar Trigger Slot

Slot ID: course_outline_mobile_sidebar_trigger_slot

Description

This slot is used to replace/modify/hide the course outline sidebar mobile trigger.

Example

Default content

Trigger slot with default content

Replaced with custom component

📌 in trigger slot

The following env.config.jsx will replace the course outline sidebar mobile trigger entirely.

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

const config = {
  pluginSlots: {
    course_outline_mobile_sidebar_trigger_slot: {
      keepDefault: false,
      plugins: [
        {
          op: PLUGIN_OPERATIONS.Insert,
          widget: {
            id: 'custom_sidebar_trigger_component',
            type: DIRECT_PLUGIN,
            RenderWidget: () => (
              <h1 className="d-xl-none">📌</h1>
            ),
          },
        },
      ]
    }
  },
}

export default config;