Changing the color palette for a page is a nice way to add some variety to your site. But sometimes you might want completely different layouts for the sections of your site. Custom layouts allow you to do this. You will probably want to make changes to the default layout as well to give your store a unique look.
Your layouts are stored in the layouts directory of the store. The default layout is lay_default.cfm. You should use the ‘lay_’ prefix for all your layouts to make it easier to find them. If you look at the lay_default.cfm page, you’ll notice a fair amount of ColdFusion code in there, not just HTML. The various put_.cfm pages contain different bits of code that you can include into your layouts to do different tasks. The cfinclude for put_layouthead.cfm for instance, should be included on all of your layout pages to create the header of the page which includes various scripts and functions needed for the store pages to work properly. Other files are included for things like persistent login box, store menus, storewide discounts, shopping cart summary, footers, etc. All these items are optional and may be included or not in your layout. There is also a link for the style sheet and the code that outputs the body tag using your color palette settings.
The most important part of the layout is the line that outputs the content generated by CFWebstore:
<cfoutput>#fusebox.layout#</cfoutput>
This line should appear in the middle of your design between your header and footer, where you want the content of your site to appear.
You can include the other files wherever you wish or leave them out altogether. Feel free to modify the code in the individual pages as well as needed, move them around and configure them in whatever way you wish. You shouldn’t let the current design constrain you, be creative and see what you can come up with! Here is a list of the various layout components you can use in your layouts:
One thing to be aware of when doing your layout is support for shared SSL. We highly recommend purchasing your own custom SSL certificate, but if you decide to try using a shared SSL provided by your host, you need to make sure to pass session variables on the URLs to prevent losing the session. The store creates a set of variables you should use, Request.Token1 and Request.Token2. These variables are used to add the CF session variables to store URLs especially going from a non-secure to secure link and vice versa. The first should be used if there are no other variables on the URL (such as index.cfm), and the second is used if there are already variables on the URL (such as index.cfm?fuseaction=basket.display). Take a look at the sample layout to see examples of how to use these variables, and be sure to have all links with these variables inside cfoutputs or they won’t work!
Once you have your layout created, you can use it as the default for your site by naming it lay_default.cfm (you might want to save a backup of the one that comes with the store as a reference!) Or you can save it under another name and change the default palette setting to use your new layout (this is a good way to prevent overwriting your layout when updating the store). You may want to change the default layout near the end of the fbx_Layouts.cfm page as well. You can also create new layouts to use for different sections of your store. Create a new color palette (or make a copy from the one you want to use) and enter the filename for the new layout in the settings for the palette. Select this color palette for the pages you wish to apply it to.
The store also contains an alternate layout example (lay_alt.cfm) and a layout used for printable pages with no navigation or other page elements (lay_blank.cfm). Feel free to customize and use these layouts as well.
The admin layout and all associated components are found the layouts/admin directory and generally shouldn’t be modified other than by advanced webstore developers. However, if you often view the admin from a browser/monitor with limited space you may prefer to remove the admin banner at the top, this can be done in the main frameset in lay_admin.cfm. If you want to play with the colors of the sidemenu, that can be found in lay_adminmenu.cfm and in the rico.js file (around line 179).