Example 13.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.)
layout
URL parameter for visitors coming to the site, and as the name of the directory
under /WEB-INF/layouts
that holds the new layout's
customized templates. So, go ahead and create a subdirectory under
/WEB-INF/layouts
named
special
. While you're at it, within that directory
create the same subdirectories found under the custom
and default
directories: core
, product
, order
,
customer
, and payment
.layout
URL
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.default
directory to the
special
directory. If the visitor is assigned to the
"special" layout, the store will first look in the
special
directory to include each template. If it does
not exist there, it will then include the corresponding template in the
default
directory.Important | |
---|---|
An important setting for controlling multiple custom layouts is the "Default Layout"
setting in the |
Copyright © 2009-2017 SoftSlate, LLC. All Rights Reserved.
Powered by SoftSlate Commerce