Basic Site Template Structure

The basic structure of a site template includes a site (with assets, layouts, pages, and content), an associated theme, and any custom components.

When you create a site, you must choose a site template to provide the site structure and initial content, a theme with design and layout specifications, and any custom components.

A site template is organized in a specific structure, as illustrated in this example showing basic folders and files.

template_name
    components
        component_name
            assets
                render.js
                settings.html
            _folder.json
            _folder_icon.jpg
            appinfo.json
    template
        assets
        content
        layouts
        pages
            100.json
            200.json
            300.json
            400.json
        variants
        _folder.json
        _folder_icon.png
        componentsused.json
        controller.html
        siteinfo.json
        structure.json
    theme
        assets
            css
                main.css
            js
                topnav.js
        designs
            default
                design.css
                design.json
                facebook.png
                googleplus.png
                linkedin.png
                twitter.png
                youtube.pgn
        layouts
            index.html
        responsepages
            404.html
        _folder.json
        _folder_icon.png
        components.json
        viewport.json

Component and theme folders and files are described elsewhere in this guide. See About Developing Components and Basic Theme Structure.

Notes:

  • Generally a theme is shared between site templates, unless you use the JET Starter Template or Starter Template, which uses a copy of a theme. See Work with a Starter Template.

  • The theme no longer contains the site. The site folders and files are in the /template folder.

The template_name/template folder contains the folders and files for the site.

  • assets: Contains images that are displayed in the site template details page in the user interface.

  • content: Contains managed content used in the site.

  • layouts: Not used at this time.

  • pages: Contains all the page JSON files with data. Uses the format nnn.json, where nnn is the page ID.

  • variants: Contains details of all the updates for the site.

  • _folder.json: Contains metadata for the site template, such as site author, site name, item GUID, short and long site descriptions.

  • _folder_icon.png: Represents the site in the user interface.

  • componentsused.json: (Deprecated.) Records the custom components that are used, if any, within the site. Maintained only for backwards compatibility.

  • controller.html: Contains the key code that displays the site in a browser. If you want to make changes to this file, Oracle recommends that to do this through the site settings in the interface. You can modify the file offline. See Customize the Controller File.

  • siteinfo.json: Identifies the site name and the name of the associated theme along with other metadata for the site. Don’t modify this file.

  • structure.json: Defines the hierarchy of the site for pages (parent and child pages). The Render API can be used to draw out the tree structure when setting up navigation for the site. See Site Navigation and Render API Reference.