> ## Documentation Index
> Fetch the complete documentation index at: https://memberpulseptyltd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Embedded Widgets

> Generate embeddable widgets for external websites

Create embeddable widgets to display MemberPulse content on external websites.

## Widget Types

| Widget         | Description        |
| -------------- | ------------------ |
| Event List     | Upcoming events    |
| Event Calendar | Calendar view      |
| Course Catalog | Available courses  |
| Job Board      | Job listings       |
| Directory      | Business directory |
| Resource Feed  | Latest resources   |

## Embed Methods

### iframe

```html theme={null}
<iframe src="https://yourorg.memberpulse.com/widgets/events" 
        width="100%" height="400"></iframe>
```

#### Acceptance Criteria

##### Frontend

* [ ] iframe workflow is implemented in the UI as described.

##### Backend / API

* [ ] Backend behavior supports iframe as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

### JavaScript

```html theme={null}
<div id="mp-events"></div>
<script src="https://yourorg.memberpulse.com/widgets/events.js"></script>
```

#### Acceptance Criteria

##### Frontend

* [ ] JavaScript workflow is implemented in the UI as described.

##### Backend / API

* [ ] Backend behavior supports JavaScript as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

### WordPress Shortcode

```
[memberpulse_events limit="5" category="webinars"]
```

#### Acceptance Criteria

##### Frontend

* [ ] WordPress Shortcode workflow is implemented in the UI as described.

##### Backend / API

* [ ] Backend behavior supports WordPress Shortcode as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

## Configuration

* Widget dimensions
* Color theme
* Number of items
* Category filters
* Display options

## Features

### Embedded Widgets

#### Acceptance Criteria

##### Frontend

* [ ] UI supports the workflows described in this feature.

##### Backend / API

* [ ] Backend behavior supports this feature as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

## Implementation Contracts

### Backend (API)

```
GET    /api/widgets                          # List widgets
POST   /api/widgets                          # Create widget config
PUT    /api/widgets/{id}                     # Update widget
GET    /api/widgets/{id}/embed               # Get embed code
GET    /api/widgets/{id}/preview             # Preview widget
```
