Creating a New CMS Project

Now that you have a little background on how a CMS project is different from a typical ASP.NET application, let's create a new CMS project. Before we begin, make sure that you have the following installed on your development machine:

  • Visual Studio .NET

  • Content Management Server 2002

  • IIS

  • Content Management Server 2002 Site Manager

NOTE: CMS requires a SQL server to house the repository. The SQL server does not have to run on the same server/PC that you're developing on, but you will need access to one.

Once you have the components installed and running on your machine, follow these steps to create your new CMS project.

  1. Open Visual Studio and click the File menu.

  2. From the list of options, pick New and then pick Project.

  3. After you've done this, you will see a dialog like the one pictured in Figure 10-2.

    Figure 10-2. The New Project dialog in VS.NET


  4. From the list of project types, click the plus (+) sign next to the Content Management Server type.

  5. Under Content Management Server will be the choice of two different project types: one for C# and one for VB.NET. In this book, all examples will be in C# (which is how we created our project). However, you can choose either language.

  6. Once you've chosen your language preference, you can choose from one of three types of CMS projects: MCMS Web Application, MCMS Web Service, and MCMS Empty Web Project. All the project types listed are similar to their non-CMS counterparts, except that they automatically include references to the appropriate Microsoft.ContentManagement namespaces and have the defaultconsole user control added, as we discussed earlier. For our project, click the MCMS Web Application.

  7. In the Location field, type in the name of your CMS application. In this book, we'll be using "botsconsulting" as the project name.

  8. Once you've changed the name of the project in the Location field, click OK.

  9. After about 10 to 20 seconds (depending on your machine), your new CMS project will be created.

Now that we have our project, let's examine the various new features that CMS adds to the VS.NET environment.

If you click the Tools menu in VS.NET and you're familiar with VS.NET, you'll notice that there is an entry for Content Management Server. If you choose that option, you'll notice that there are quite a few tools listed. All the tools listed are external to VS.NET, but having them in the Tools menu provides a very convenient way to get to each of them. Figure 10-3 shows the new tools added to the Tools menu.

Figure 10-3. The Tools menu in VS.NET


In addition to the new tools, there's an important window addition to VS.NET: the Template Explorer window. This new window is one that you will probably use regularly as you develop your CMS solution.

The Template Explorer is one of the views directly into the CMS repository. It shows all the template galleries and template gallery items defined within CMS (we'll learn more about each in this chapter). It is also the way that you can create new template galleries and template gallery items as you need them for your project. To show the Template Explorer window, click the View menu from within VS.NET. Choose the Other Windows option and then MCMS Template Explorer, as shown in Figure 10-4.

Figure 10-4. Choosing the CMS Template Explorer from the View menu


Once you've chosen this option, you'll see the Template Explorer window appear in your VS.NET environment (shown in Figure 10-5).

Figure 10-5. The CMS Template Explorer window


In our environment, we've docked the Template Explorer window in the same place that our Class View and Solution Explorer live. You may wish to dock the window elsewhere in your VS.NET environment. However, all subsequent screen shots will show the Template Explorer docked with the Solution Explorer and the Class View.

Now that you've created your CMS project and you have your Template Explorer window shown, let's examine template gallery items.

Microsoft Content Management Server 2002. A Complete Guide
Microsoft Content Management Server 2002: A Complete Guide
ISBN: 0321194446
EAN: 2147483647
Year: 2003
Pages: 298 © 2008-2017.
If you may any questions please contact us: