Join Joseph Lowery for an in-depth discussion in this video Accessing dynamically related files, part of Dreamweaver CC and WordPress 3.8: Core Concepts.
Well here we are in design view and as before you'll notice that the page is blank. Let's go to split view, and you can see, a number of comments there, and if I scroll down, you'll notice a define function on line 14 and a require statement on line 17, and that's about it. If I open up the file that's required here, WP blog header.php, which I can see over in my files panel. Let's go into code view, just to take a quicker look.
You can see it's not much better. There's not a whole lot of code on this page, rather a kind of a switch statement that allows WordPress to load in one file or the other. The way that word press works, is that it will continue down this path of bringing one nested php file after another. To have access to them all you need to use Dreamweaver's dynamically related files feature. Let's go back and focus on index.php. Up here in the info-bar which is this black bar right on top of the page.
You'll see a message that says, this page may have dynamically related files that can only be discovered by the server. And there are a couple of link options, Discover and Preferences. Now in Preferences under the general category you can set the options so that the discovery of dynamically related files happens automatically. I tend to like it so that you still have to do it manually each time, because then if I'm not interested in seeing the additional files I don't have to worry about them.
Let's click on Discover. And next, you'll get a script warning from Dreamweaver, saying that it was basically going to run this through the server, and if you want to proceed, click Yes. So we definitely do, so I'll click Yes. I'm also going to click Don't warn me again, because we'll be discovering the files over and over again, and there's no need for us to see this. Now you can see across the top a whole range of files that have been dynamically discovered. In fact there are so many files that they extend off the page. Now if I click the scroll button here, you'll scroll pretty quickly right to left and then I can go on the other side and scroll back if I need to if I'm trying to find one file or another there's an awful lot of files.
And you can also see them all, well as many as will fit on the screen, by clicking the Show More option here on the right-hand side of the document window. And there you see the first group of files. As you can see, there are just an amazing number of files that are interconnected here. WordPress uses 97 different files just for its default page alone. All of which, are available to you in Dreamweaver. You can access any of these files directly, just by clicking on the file name. let's choose load.php as an example, and then I'll switch to, code view, and you can scroll down the page and look at any of the various PHP functions that you want.
Don't change anything. You're certainly free to look at all the various coding and see how it's set up. There are other types of pages, as well. There's a CSS style page, and there's even XML files. Dynamically-related files are really a critical Dreamweaver feature for working with WordPress or any CMS. In the next lesson, I'll show you how to target specific files and file types.
- Setting up WordPress locally
- Establishing your Dreamweaver CC site
- Adding and editing posts and pages
- Customizing WordPress themes
- Building responsive layouts
- Extending WordPress editable pages
- Using and styling WordPress plugins
- Integrating jQuery functionality
- Publishing your WordPress site with Dreamweaver
- Personalizing and enhancing WordPress
Skill Level Intermediate
Author update on April 4, 2014:
WordPress 3.8.2 is now available from wordpress.org. The update focuses on security issues and should not impact this course in any way. A much bigger release, 3.9, is currently a release candidate and will likely go live later in April. I'm currently evaluating what impact v3.9 will have on this course.