{% extends "base.html" %} {% set page_title = widget_name + " - Integration Code" %} {% block content %}
<iframe
src="{{ request.url_root }}widgets/embed/{{ widget_type }}"
width="100%"
height="400"
frameborder="0"
scrolling="auto"
style="border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);">
</iframe>
<iframe
src="{{ request.url_root }}widgets/embed/{{ widget_type }}?limit=8&genus=Cattleya"
width="100%"
height="500"
frameborder="0"
scrolling="auto"
style="border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);">
</iframe>
| Parameter | Description | Example |
|---|---|---|
limit | Number of orchids to display | ?limit=8 |
genus | Filter by specific genus | ?genus=Cattleya |
query | Default search term | ?query=purple |
rotation | Auto-rotate featured orchid | ?rotation=daily |
border: 1px solid #ccc if neededFor custom JavaScript integration, use the JSON API:
{{ request.url_root }}widgets/api/{{ widget_type }}
fetch('{{ request.url_root }}widgets/api/{{ widget_type }}')
.then(response => response.json())
.then(data => {
console.log('Widget data:', data);
// Use data.data to access widget content
// Render your custom widget here
})
.catch(error => {
console.error('Error loading widget data:', error);
});