Editor - Widget Editing
Widgets are dynamic content blocks that can be added and configured visually in the O2VEND Theme Editor. This guide covers widget editing.
Widget Overview
Widgets provide:
- Dynamic content management
- Visual configuration
- No code editing required
- Flexible page layouts
Adding Widgets
From Settings Panel
- Open Settings panel
- Navigate to page section
- Click "Add Widget"
- Select widget type
- Configure settings
- Widget appears in preview
From Preview
- Click "Add Widget" button in preview
- Select section (hero, content, footer)
- Choose widget type
- Configure settings
- Save
Widget Types
Available widget types include:
- Product Widgets: Product displays, carousels
- Category Widgets: Category lists, carousels
- Brand Widgets: Brand displays
- Content Widgets: Carousels, galleries, HTML
- Navigation Widgets: Headers, footers, menus
- Special Widgets: Discount timers, recently viewed
See Widgets documentation for complete list.
Editing Widgets
Select Widget
- Click widget in preview
- Widget highlighted
- Settings panel opens
- Edit configuration
Widget Settings
Each widget has specific settings:
Product Widget:
- Title
- Product selection
- Display style (grid, list, carousel)
- Number of products
- Show price, title, description
Carousel Widget:
- Images/content
- Autoplay
- Navigation arrows
- Dots indicator
- Speed
HTML Widget:
- HTML content
- CSS styling
Live Preview
- Changes reflect immediately
- Preview updates automatically
- Test different configurations
Widget Configuration
Basic Settings
All widgets have:
- Title: Widget title (optional)
- Section: Where widget appears
- Position: Order in section
Widget-Specific Settings
Configure based on widget type:
{
"type": "ProductWidget",
"settings": {
"title": "Featured Products",
"products": ["prod-1", "prod-2"],
"display_style": "grid",
"columns": 3,
"show_price": true,
"show_title": true
}
}
Widget Positioning
Reorder Widgets
- Drag widget in preview
- Drop in new position
- Position updated
- Save changes
Widget Sections
Widgets organized by section:
- Hero: Top banner area
- Content: Main content
- Footer: Footer area
- Sidebar: Sidebar content
Widget Forms
Visual Forms
Widgets use visual forms for configuration:
- Text inputs
- Dropdowns
- Checkboxes
- Image pickers
- Color pickers
Form Validation
- Required fields validated
- Format validation
- Error messages shown
- Cannot save invalid data
Widget Templates
Widget templates are located in the widgets/ directory of your theme. Each widget type has its own template file that defines how the widget is rendered.
Widget Rendering
Widgets rendered automatically:
{% for widget in widgets.hero %}
{% render 'widget', widget: widget %}
{% endfor %}
Widget Management
Duplicate Widget
- Right-click widget
- Select "Duplicate"
- Copy created
- Edit as needed
Delete Widget
- Select widget
- Click "Delete" button
- Confirm deletion
- Widget removed
Widget Visibility
Control widget visibility:
- Show on specific pages
- Hide on mobile/desktop
- Conditional display
Widget Best Practices
1. Use Appropriate Widgets
Choose widgets that fit your needs:
- Product widgets for products
- Carousel for images
- HTML for custom content
2. Limit Widget Count
Don't overload sections:
- 3-5 widgets per section
- Balance content
- Maintain performance
3. Consistent Styling
Use consistent styling:
- Match theme colors
- Consistent spacing
- Unified design
4. Mobile Responsive
Ensure widgets work on mobile:
- Test all viewports
- Responsive images
- Touch-friendly controls
Widget Examples
Featured Products
- Add Product Widget
- Select "Featured" collection
- Set display to grid
- 4 columns
- Show price and title
Hero Carousel
- Add Carousel Widget
- Upload images
- Add text overlays
- Enable autoplay
- Set navigation
Category Showcase
- Add Category List Widget
- Select categories
- Set to carousel
- Show images
- Link to categories
Widget Troubleshooting
Widget Not Displaying
- Check widget is in correct section
- Verify template includes widgets
- Check widget settings
- Review console for errors
Widget Not Saving
- Check form validation
- Verify required fields
- Check network connection
- Review error messages
Next Steps
- Preview System - Preview your widgets
- Publishing - Publish your changes
- Widgets Documentation - Learn about widgets