Example 12.1. Creating an Additional Custom Layout for Visitors Coming from an Affiliate
Let's say we want to create a special look and feel for people who visit the store from a link on a particular affiliate's site. (Perhaps we want to include the affiliate's logo in the store's header, or change the text or colors around a bit. Any customization on any or all screens is possible.)
layoutURL parameter for visitors coming to the site, and as the name of the directory under
/WEB-INF/layoutsthat holds the new layout's customized templates. So, go ahead and create a subdirectory under
special. While you're at it, within that directory create the same subdirectories found under the
layoutURL parameter, with a value of "special", to any links that take visitors from their site to your store. For example, the link to your Welcome Screen would look something lie this:
http://www.storesdomainname.com/softslate/Welcome.do?layout=special. When SoftSlate Commerce sees that parameter on the URL, it knows to use the "special" layout throughout the user's session.
defaultdirectory to the
specialdirectory. If the visitor is assigned to the "special" layout, the store will first look in the
specialdirectory to include each template. If it does not exist there, it will then include the corresponding template in the
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. For complete details, refer to the section on the Default Layout Setting
Copyright © 2005 SoftSlate, Inc. All Rights Reserved.