You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would like to add this extension to the library. It is basically a template that can be used to easily build an extension quickly (includes code to place the extension on the page.
Would like to add this extension to the library. It is basically a template that can be used to easily build an extension quickly (includes code to place the extension on the page.
{ "plugin_type": "widget", "name": "Extension Template", "edit_page_url": "www.optimizely.com", "form_schema": [ { "default_value": "before", "field_type": "dropdown", "name": "position", "label": "Position", "options": { "choices": [ { "value": "before", "label": "Before" }, { "value": "after", "label": "After" }, { "value": "replace", "label": "Replace" }, { "value": "prepend", "label": "At Beginning" }, { "value": "append", "label": "At End Of" } ] } }, { "default_value": "None", "field_type": "selector", "name": "selector", "label": "Selector", "options": null }, { "default_value": "Title Text", "field_type": "text", "name": "title", "label": "title", "options": null }, { "default_value": "Title Text", "field_type": "text", "name": "text", "label": "text", "options": null } ], "description": "", "options": { "html": "<div id=\"optimizely-extension-{{ widget.$instance }}\" class=\"heroWidget\">\n</div>", "css": "", "apply_js": "$(function() {\n \nif(extension.position == \"before\"){ \n $(extension.selector).before(extension.$html);\n} else if(extension.position == \"prepend\") { \n $(extension.selector).prepend(extension.$html);\n} else if(extension.position == \"after\") { \n $(extension.selector).after(extension.$html);\n} else if(extension.position == \"append\") { \n $(extension.selector).append(extension.$html);\n}else{\n $(extension.selector).html(extension.$html);\n}\t\n\n});", "undo_js": "$('#optimizely-extension-' + extension.$instance).remove();" } }
The text was updated successfully, but these errors were encountered: