Build the main page using MX Includes

Now that the site pages and the CSS layout are created, you can build the main page using MX Includes and complete your website.

Open the index page, if not already opened, and start bringing in the files you already built:

  1. Remove the temporary text from the header placeholder ("Header placeholder"): select it and press Delete. Leave the cursor where it is and from the Application panel, Server Behaviors -> + -> MX Kollection -> Server-Side Includes, apply the Server-Side Include server behavior. Configure the dialog box that opens as shown below:


                             

  2. In a similar manner, remove the temporary text from the footer placeholder ("Footer placeholder") and include the footer page in that div.

  3. Repeat these steps once again for the menu placeholder: remove the temporary text ("Menu placeholder") and include the menu page in the div. Notice that the menu translator inserted in page looks differently than here (in browser though it looks as expected). The reason for this difference is the fact that the set CSS skin does not seem to be used for the menu. To make the translator show completely (including the CSS styles), right-click (anywhere) inside the index page, and from the menu that opens, select CSS Styles -> Design time:


                             
    In the dialog box that pops-up, click the Plus (+) button above the Show only at design time grid. In the Select File window browse to the \includes\cssmenus2\skins folder from your site structure, then open the folder corresponding to your menu skin (nature here) and select  the .css file having the name of the chosen layout (vertical.css here):


                             
    Click OK to select the file, and then once again to close the Design Time Style Sheets dialog box:


                             
    The menu translator should be visible right now.
    Note:
    When in a Dreamweaver page you apply the Server-Side Include server behavior to include files that contain menus (either static or dynamic) generated with MX CSS Menus, follow the steps above to have the menu properly displayed in Design view.

  4. Finally, remove the temporary text from the content placeholder ("Content placeholder"), and from the Application panel, Server Behaviors -> + -> MX Kollection -> Server-Side Includes, apply the Server-Side Includes From List server behavior. The dialog box has two tabs.

  5. Configure the Basic tab of the server behavior as shown below:


                             

  6. Configure the Parameter tab of the server behavior as shown below:


                             

After following all these steps, the index page in Dreamweaver, in Design view, should look like this:

 

Notice in the Server Behaviors tab of the Application panel the four server behaviors added after performing these operations.

Save the index page and upload it to the server.

With this you completed the MX Includes-using application. Preview it in browser by pressing F12 in the index page:

 

Notice how the page content on the right changes according to the menu item selected.

In the tutorial you just completed, you created a website by putting together its components in one main page, using MX Includes. The menu you generated is a database-driven one, having its items links built with an URL parameter.