Join James Williamson for an in-depth discussion in this video Setting up Spry management, part of Dreamweaver CS4: Introduction to Spry.
Before we get started with learning more about Spry, I want to take just a moment to talk about something that's going to be very, very important for this title and that's managing your Spry assets. Throughout the title, we'll need to redefine Spry's default Spry assets directory, so that when we create Spry elements on our page, our assets are copied into the right folder. Now in each exercise that we do this, I'll give you brief instructions on how that's done, but I think it's worth going over before we get into the title so that you're aware of why we're doing what we're doing. So to control the default Spry assets directory in Dreamweaver, you just go to your Site Definition dialog box. The easiest way to get to that is go over to Files panel, find the name of your site in this pulldown menu and simply double-click.
When you do that, the Site Definition dialog box will come up, just click on the Advanced tab, you want to go down to the Spry category. In the Spry category, there is only one option and that's, hey, where should the default Spry assets directory be? Now, by default, Dreamweaver will copy your Spry assets over to a directory on the root folder called Spry assets. If that folder does not exist, Dreamweaver is going to create it for you. Well, using this method you can take control of exactly where does it place. So if you click the Browse folder, you can go anywhere throughout your site and tell exactly where to place your Spry assets.
So as we get into specific exercises, I'll give you instructions on exactly which folder and directory should be the current default Spry assets directory. Make sure that you use this method to set it before completing the exercise, that way our Spry assets won't be overwritten, modified, or ignored and everything should work properly. I'd also like to point out that I use a custom workspace in this title. Now if you're curious about my custom workspace, I'll go ahead and show it to you now, that way, if you want to build the same exact workspace that I use, you're free to do that.
Now I'm just going to open up the page here and you can open up any page or you can do what I'm going to do which is just to create a blank page. I just want to make sure I'm looking at the default workspace. So as I modify it, I know exactly what I'm doing here. Now I really like the Split-Screen View but I don't like that to be my default view, so the first thing I'm going to do is just switch that to Design View so that that's my default view. The next thing I'm going to do is I'm going to take the Insert toolbar, which is by default over here on the side, and I'm going to move that over here above the document window. Now I can do that manually or I can just switch workspaces because the Classic workspace has that, you've got to remember, go back to Design View. So by switching to Classic the Insert toolbar is exactly where I want it.
Now I'm going to change one more thing. When I'm working in Dreamweaver, I really like to have access to my page validation and checking for browser compatibility in running reports and doing searches and Find and Replaces right at my fingertips. I really like to have that functionality. Well, that's in a whole set of panels, we can get by going to Results and choosing any of these options. I'm just going to go ahead and choose Search. Now, you'll notice that it went ahead and docked this just below the Properties Inspector. It's not exactly the most efficient layout, so what I'm going to do is I'm going to take the tab of the Properties Inspector, I'm going to drag that over this panel grouping and now my Properties Inspector is part of this much larger group.
Now, most people like the Properties Inspector to be over here on the left-hand side, so I'm going to grab that and just simply slide it on over until it is the leftmost panel. Now, in addition to my Properties Inspector, I have the Search, Reference, Validation, Browser Compatibility, all of these groups of panels down here. So that just makes my life a little bit easier. Now once I've got that workspace set, I'm going to save it, so I'm going to go up to my Workspace Switcher right up here at the top and I'll choose New Workspace and I'm just going to call that one The James, feel free to insert your own name.
Now no matter what happens, no matter how things get changed up or moved around or undocked or resized, I can go right back to The James and I get exactly what I'm looking for, perfect! So keep in mind that as we go into each new exercise, we may need to redefine the Spry assets directory, and now we know how to do that, and also, if you want your workspace to match mine, you can just build this workspace for yourself.
- Validating form data to give users robust feedback
- Customizing widgets to meet the style of a web site
- Building a pull-down menu navigation system
- Pulling data from XML, HTML, and Excel spreadsheets
- Constructing datasets and widgets using code