SoftSlate Commerce
Home » Get Support » Documentation » HTML Documentation

Default Layout Setting

An important setting for controlling multiple custom layouts is the "Default Layout" setting in the Settings -> Display screen of the administrator.

This 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 default directory when the store is first installed.

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 Settings -> Display screen. By default, this would be the /WEB-INF/layouts/custom directory.
  4. If the template still cannot be found, the system uses the /WEB-INF/layouts/default directory to find the template.

[Tip]Tip

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

Copyright © 2008 SoftSlate, LLC. All Rights Reserved.

Powered by SoftSlate Commerce

Foraker Design