Viewers: in countries Watching now:
Covering diverse topics such as improving workflow and managing CSS styles, Dreamweaver CS3 Beyond the Basics is a hands-on course that teaches users how to move beyond standard, static websites. Instructor James Williamson explores how to increase productivity, interactivity, and accessibility with Dreamweaver. He also discusses how to extend the application's capabilities with XML and XSL. Exercise files accompany the tutorials.
To have our style RSS feed display on our site, we need to perform a server-side transformation. For this exercise, you will need access to a testing server running either PHP, ASP or ColdFusion. Regardless of the server model you choose, the steps will be exactly the same. Dreamweaver handles the creation of all the server side code for you. In this example, I will be using a PHP server. If you've never configured a server to work with Dreamweaver before, be sure to check out our chapter on dynamic content. I am back in Dreamweaver in my exercise files, and we have the file news.php opened up. Now if you are not using PHP as a server technology, just do a Save As and save that as either .ASP or .CFM whichever server model you are using because again the steps will be exactly the same.
We need to remove our dummy information from below because this is where our server-side transformation is going to take place. So I am going to go ahead and highlight all of this content, our Fake posting date and all that and we'll go ahead and get rid of it. Now very important that we also remove any container tags. So you will notice that after I hit Delete down on my Tag Selector, I can see that the H1 headline tag is still there. I don't want this content to transform inside of this tag. So I am going to right-click or Ctrl+ Click this tag and choose Remove Tag from my Tag Selector and that will just go ahead and get it out of the way without having to go into Code view, which is perfect.
To do any type of server-side technology, we use the application panel grouping. So if your application group isn't opened, go ahead and open it up and we're looking specifically for the Sever Behaviors panel. So if you don't see your Server Behaviors panel, you can go up to Window and choose Server Behaviors. It's a little before halfway down. Now, I am seeing a couple of check marks here and if you don't see these check marks, if you see an X, that means that this step hasn't been performed yet. So notice, in order to do this exercise, I had to create a site, choose the document type and set up a testing server. So those are things that are already accomplished.
So I am going to choose the plus symbol for my Server Behaviors. So this works a lot like the Behaviors panel if you've ever worked with those and down towards the bottom, I find XSL transformation. So I am going to go ahead and select that. Dreamweaver is requesting two things to perform an XSL transformation, where is the XSLT file and where is the XML file that the transformation is going to be applied to. So I am going to browse for my XSLT file and the file that we created in the previous exercise was artnews.xsl. So we'll go ahead and choose that.
Now, your XML URL should go ahead and populate and it's populating based on a link found in the XSL file. If it doesn't populate, that's a sign that your XSL transformation probably isn't going to work and you might want to go in and verify that it's formatted properly. You can always enter this link in manually but if it doesn't self propagate, that means that there is something going on in the XSL file itself. Now, just below that, we see a dialog box for XSLT parameters and you maybe wondering what that is. If you've ever used template parameters or template expressions to actually pass conditional regions into a template page, it works pretty much the same way. We can actually write XSL expressions and pass parameters in to cause items to show up or not show up, repeat or not repeat based on those parameters.
After we complete our server-side transformation, we'll explore XSLT parameters more in our next exercise. So go ahead and click OK. We can see items of the page or dynamic data. There is the title, publication date, description and link and it's bringing in those formatting attributes from the XSL file itself. So this is a fragment, we wouldn't be able to do this to an entire page. If we have done this to an entire page, Dreamweaver would ask us, hey, would you want me to do with the rest of the content that's already on this page? So I am going to go ahead and save my file and I will test this in my browser and now when I test this in my browser, Dreamweaver is going to prompt me and say do you want me to update this copy on a testing server? So we actually have to test this from our testing server because the transformation is being done on the server. So I will say Yes and then I am going to upload any dependent files necessary.
Now, it's very important that we do that at least the first time that we test this and I will show you why in just a moment. So we'll click OK, it should upload these files and now my news page populates with the RSS feed. As I scroll down, I can see all of those articles. As a matter of fact, as I continue scroll down, that's a lot of content. That's probably more content than I actually want to display. So it's great if they have this many articles but I think my users probably won't want to read through all that. So in our next exercise, we're going to see how we can limit the number of articles that displays on the page. Before we do that however, let's close Firefox, come back into Dreamweaver because there is something I want to point out about what happens when you do a server-side transformation.
I am going to look in my Files panel and in my files panel, I see a new folder that I didn't have before, it's called includes. If I open that up, it has another folder in it called mmxsltransform and when I open that up, it has the class objects that PHP needs in order to perform the transformation. So the mmxsltransform is an Adobe specific class of objects. So we need to pass that information onto PHP, so that it understands how to perform the transformation. So when you upload your files to the server at least for the first time, you want to make sure those includes files or uploaded as well. If you move those around, you are going to need to go into the code and make sure that the relative path still matches those. Okay, so we're ready to go onto our final exercise in our XSL chapter. That will be to pass XSL parameters and expressions into our transformation to affect the final rendering.
Find answers to the most frequently asked questions about Dreamweaver CS3 Beyond the Basics .
Here are the FAQs that matched your search "" :
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.