Component options

Each component carries with his options. The options can be considered optional data or set a different behavior.

Custom options

The other options are to be defined in the component structure and are accessible by the component settings icon.

Defining component options

Components of the options are defined in the structure JSON.

Several types of actions are available and are working to add new ones.

Classic options

A classic text field with no possible html:

Return a simple text.

<?php
/*
Template Name: Product with options
Description: Product with color options
---------------------------------------------------------------------
{"type": "option", "name": "Option couleur", "slug": "color"}
---------------------------------------------------------------------
*/
?>

Number Option

Return a integer

<?php
/*
Template Name: Beautiful Products
Description: Products
---------------------------------------------------------------------
{"type": "option-number", "name": "Number of product", "slug": "ProductNumber"}
---------------------------------------------------------------------
*/
?>

Switch Option

Return a boolean

<?php
/*
Template Name: Product available
Description: Product available
---------------------------------------------------------------------
{"type": "option-switch", "name": "isAvailable", "slug": "isAvailable"}
---------------------------------------------------------------------
*/
?>

Select Option

Return a string

<?php
/*
Template Name: Product
Description: Product
---------------------------------------------------------------------
{"type": "option-select", "name": "State", "slug": "state", "choice": "active, enable, disable"}
---------------------------------------------------------------------
*/
?>