Initial Sandbox Content initial-sandbox-content

In this section, you create the following pages which all use the page template:

  • SCF Sandbox Site, which redirects to the English version of the main page.

    • SCF Sandbox - The main page for the English version of the site.

    • SCF Play - Child of the main page on which to play.

This tutorial does not delve into language copies. Instead, it is designed so the root page may implement detection of the preferred language for the user through the HTML header, and redirect to the appropriate main page for the language. The convention is to use the two-letter country code for the node name of the page, for example, “en” for English, and “fr” for French.

Create First Pages create-first-pages

Now that there is a page template, you can establish the root page of the website in the /content directory.

  1. The standard UI currently provides blueprints for creating sites. As this tutorial is creating a simple site, the classic UI is useful.

    To switch to the classic UI, select global navigation and hover over the right side of the Projects icon. Select the Switch to Classic UI icon which appears:

    classic-ui

    The ability to switch to the classic UI must be enabled by an administrator.

  2. From the classic UI Welcome page, select Websites.

    classic-ui-website

    Alternatively, access the classic UI for Websites directly by browsing to /siteadmin.

  3. In the explorer pane, select Websites and then in the toolbar select New > New Page.

    In the Create Page dialog, enter the following:

    • Title: SCF Sandbox Site
    • Name: an-scf-sandbox
    • Select An SCF Sandbox Play Template
    • Click Create

    classic-ui-create-page

  4. In the explorer pane, select the page you created, /Websites/SCF Sandbox Site, and click New > New Page:

    • Title: SCF Sandbox
    • Name: en
    • Select An SCF Sandbox Play Template
    • Click Create
  5. In the explorer pane, select the page you created, /Websites/SCF Sandbox Site/SCF Sandbox, and click New > New Page

    • Title: SCF Play
    • Name: play
    • Select An SCF Sandbox Play Template
    • Click Create
  6. This is how the website now appears in the Websites console. Notice that child pages of the item selected in the explorer pane are displayed in the right pane where they can be managed.

    classic-ui-website-page

    This is the repository view of what was created using the Website tool and the template:

    classic-ui-repository-view

Add the Design Path add-the-design-path

When [/etc/designs/an-scf-sandbox](setup-website.md#setupthedesigntreeetcdesigns) was created using the designs section of the Tools console, the property ``

  • cq:template="/libs/wcm/core/templates/designpage"

Was defined, which provides the optional ability to reference design assets in a script using currentDesign.getPath(). For example

  • % String favIcon = currentDesign.getPath() + "/favicon.ico"; %

    • Name: cq:designPath
    • Type: String
    • Value: /etc/designs/an-scf-sandbox
  • Click the green [+] Add

The repository should appear as follows:

classic-ui-repository-path

  • Click Save All

If there is any trouble saving the configuration, relogin and configure again.

NOTE
The use of cq:designPath is optional and is unrelated to the use of clientlibs, which are required as the SCF components use clientlibs to manage their JS and CSS.
recommendation-more-help
81e2cd9d-0789-409d-b87c-2a8ce4f28791