Using Subsites

Subsites are an important concept for site management. Expression Web 2 treats subsites as though they were completely independent sites.

One reason that you might want to segregate certain folders in a site as subsites is that you might have a large number of files within those folders, and the files don’t change as often as the other files in the root of the site. There’s no reason to wait out a long file-comparison cycle during an Expression Web 2 publishing session when you know that the files haven’t changed. Also, you may want to publish a segment of your site via the secure sockets layer (https://) if it contains sensitive files such as e-commerce site configuration or database files.

Another good reason to use subsites is that you might be developing a replacement site. You can create a subsite on your server-based site, such as ExpressionWebStepbyStep.com/new-design/, and then publish your new design directly into the subsite. That way, you can show it to people by giving them the direct address to it, but the general public wouldn’t know it was there and therefore wouldn’t see it.

Subsites are a good way to segregate files for architectural reasons and also to provide for greater publishing efficiency.

In this exercise, you will convert a folder to a subsite, publish a subsite, and convert a subsite to a folder.

Note

Using Subsites

USE the CH10 sample site that you modified in the last exercise.

OPEN the CH10 site if it is not already open.

  1. In the Folder List, click SecondSite to display its contents in the workspace.

    It contains all of the files necessary for a stand-alone site. Imagine that the SecondSite folder is a new template or replacement site that you are working on within the CH10 root site.

  2. In the Folder List, right-click SecondSite, and then click Convert to Web.

  3. In the warning box Expression Web 2 displays, click Yes.

    Tip

    This warning box is to inform you of the fact that Expression Web 2 will consider the folder as a completely separate site.

    Expression Web 2 converts the folder to a subsite. It now has a different icon, and the workspace displays a notice that Expression Web 2 cannot display the contents of a subsite.

  4. In the Folder List, double-click SecondSite to open it in a new instance of Expression Web 2.

    Tip

    With the subsite open in Expression Web 2, you can perform any operation that you could perform on any other Expression Web 2 site, with the added benefit of being able to publish it independently of the parent site that contains it.

    There are two ways to publish a subsite. One method is to open a subsite within Expression Web 2 and publish it as you would any other site. The second method is to perform the following actions: with the parent site open, click Publish on the File menu. On the Publishing tab of the Remote Web Site Properties dialog box, select the Include Subsites check box.

    Troubleshooting

    When you publish a subsite by opening it directly in Expression Web 2, be sure to append the publish location with the name of the subsite. For example, if you publish the parent site to http://example.com, but you want to publish a subsite to the server, just append http://example.com with /{name of the subsite}, resulting in a URL such as http://example.com/subsite. If you don’t append the subsite name, all of the subsite’s files will be placed in the root of the parent site. When it publishes a subsite for the first time, Expression Web 2 prompts you that a site does not exist at the location you’re trying to publish to and offers to create a site in that location. Click Yes.

  5. Close the Expression Web 2 window that contains the subsite, and switch to the Expression Web 2 window that contains the CH10 sample site.

  6. In the Folder List, right-click SecondSite, and then click Convert to Folder.

  7. Click Yes in the warning box.

    Troubleshooting

    The subsite is returned to a conventional folder, and its contents are now displayed in the workspace.

Note

Troubleshooting

CLOSE the CH10 site. If you are not continuing directly to the next chapter, exit Expression Web 2.

You’ve now converted a folder to a subsite and a subsite back to a folder within Expression Web 2. Because Expression Web 2 treats subsites as though they were completely independent sites, subsites can be an advantage for organizing and publishing efficiency. Keep in mind, however, that because they’re treated as completely independent sites, you can’t use an asset such as a Dynamic Web Template across the subsite boundaries.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.198.7