The location where you create the element directory structure determines if an element is widget-specific or stand-alone. Widget-specific elements are included in an element/ directory under the directory structure for the widget type they pertain to:

<extension-name> : the root folder of your extension
    ext.json
    widget/
        <widget-type>/
            widget.json
            element/
                <element-name>/
                    element.json
                    templates/
                        template.txt
            layouts/
                <layout-name>
                    widget.template
            templates/
                display.template
            [additional widget-related directories for templates, JS, CSS, etc]

Stand-alone elements are included, in an element/ directory, under the extension root:

 <extension-name> : the root folder of your extension
    ext.json
    element/
        <element-name>/
            element.json
            templates/
                template.txt

Regardless of where you create your elements, each element must have a unique name. An element directory may also contain one or more named directories containing the JavaScript, HTML, and locale fragments related to the element, for example:

<element-name>/
    element.json
    js/
        element.js
    locales/
        <locale code, for example, en or en_US>/
            ns.<element-name>.json
        <other locales>/
            ns.<element-name>.json
    templates/
        template.txt

Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices