SoftSlate Commerce
Home » Documentation » HTML Documentation

Default Layout Setting

Two important settings for controlling custom layouts are the "Default Layout" and "Base Layout" settings in the Look and Feel Settings -> Advanced Display Settings screen of the administrator.

The "Default Layout" setting tells SoftSlate Commerce which layout to give users by default, if the layout is not specified on the URL. Initially, it is set to "custom", meaning that fresh visitors coming to site will get the templates in the /WEB-INF/layouts/custom directory, if they exist. However, since the custom directory is empty when SoftSlate Commerce is first initialized, in effect visitors see the templates in the "Base Layout" directory when the store is first installed. For implementations initally installed before version 2.3, the "Base Layout" is /WEB-INF/layouts/default. For implementations initally installed with version 2.3 through version 3.3.1, the "Base Layout" is /WEB-INF/layouts/default-xhtml. For implementations initally installed with version 3.3.2 or later, the "Base Layout" is /WEB-INF/layouts/default-html5.

To clarify, here are the steps SoftSlate Commerce takes to determine which JSP template to use for a given user:

  1. SoftSlate Commerce first looks for a request parameter on the URL or posted in a form named layout. If this parameter exists, its value is placed in the user's session and is carried with the user until the session expires.
  2. If the user's layout has been set, SoftSlate Commerce looks for the JSP template under a directory of the same name, inside the /WEB-INF/layouts directory. In other words, if the user's layout has been set to special, the system uses the JSP templates inside the /WEB-INF/layouts/special directory.
  3. If a given template does not exist under the directory defined by the layout parameter, the system next looks inside a directory of the same name as the Default Layout setting defined in the Look and Feel Settings -> Advanced Display Settings screen. By default, this would be the /WEB-INF/layouts/custom directory.
  4. If the template still cannot be found, the system uses the directory of the same name as the Base Layout setting to find the template (/WEB-INF/layouts/default-html5 if after version 3.3.2).

[Tip]Tip

For complete details on how to set up multiple custom layouts, refer to the Multiple Custom Layouts section.

Copyright © 2009-2017 SoftSlate, LLC. All Rights Reserved.

Powered by SoftSlate Commerce

Foraker Design