How To: Integrate the AJAX Gallery Viewer with CS2007

When designing this new theme, I knew that designing the gallery would be important and a lot of work. I wanted an AJAX feel if possible, but I didn’t want to have to go through a huge learning curve just for that. So when I saw the AJAX Gallery Review on Smashing Magazine, I thought I would implement one of them. The one that I thought was most interesting was Slimbox. Implementing this was far easier than I could have ever imagined. Here is the process:

  1. Go to Slimbox and download the bits.
  2. Download the mootools framework choosing all the features listed here. The default Packer compression is ok, even though it mentions PHP.
  3. Extract the files to your web directories. I put slimbox.js and the mootools js file in the common directory of my theme, then the slimbox.css in the style folder.
  4. On any page I want the AJAX effect to show up, I include the following code. Since I am using master pages, this is inside a asp:content block:
    <CSControl:Script ID="Script1" runat="server" Src="~/Themes/BW/Common/mootools.v1.11.js" />
    <CSControl:Script ID="Script2" runat="server" Src="~/Themes/BW/Common/slimbox.js" />