webTemplates
WebTemplates are used to build nice structures in a Web Environment. These templates are created to work with Dialogflow Messenger.
webStructureTemplate
webStructureTemplate help us to create a custom Structure
- You can use whatever block you want but take in mind that you have to separate it with a separator (Choose what best fits to you).
- In order to make structure work, you can paste all the name's structures inside of structure, and the components required in the component array
- If you dont know already what to do with session please make it false and just declare session as empty array. (You can find Context in doc).
- Available webBlocks are card button reply description image list paragraph These can be located in blocks -> webBlocks
- Available separators are comma basicDivider commaDivider superDivider
- You can build a structure with the blocks or use this Structure Template Tool HERE
- PHP
$session = [];
$imageArray = ["imageurl"];
$aTitleArray = ["Card Title"];
$aSubtitleArray = ["Card Subtitle"];
$aTextArray = ["Card Accordeon Text"];
$bTitleArray = ["Button Title 1","ButtonTitle2"];
$bCustomArray = ["button Custom 1","button Custom 2"];
$bIconArray = ["Button Icon","Button Icon 2"];
$bColorArray = ["#00efff","#000fff"];
$structure = [
'image',
'comma',
'card',
'superDivider',
'button'
];
$components = [
[$imageArray,$webTitle],
[],
[$aTitleArray,$aSubtitleArray,$aTextArray],
[],
[$bTitleArray,$bCustomArray,$bIconArray,$bColorArray]
];
webStructureTemplate($session, $structure, $components);