Server-Side Includes From Table

With the Server-Side Includes From Table server behavior your dynamically included content can be retrieved from a database table, which stores the following data:

The meta keywords and the meta description contribute significantly to the Search Engine Optimization, helping with the Google ranking. When surfing the web looking for specific pages, the search engine will use the keywords of a page to generate the results. The results list will contain the meta description of the pages found.

Note: here is an example of how these HTML tags look like (<meta> tags are included within the <head> tag along with the <title> tag).

<meta name="keywords" content="dreamweaver extensions, web development, dynamic website" />
<meta name="description" content="Dreamweaver Extensions for Dynamic Web Sites." />

 

This server behavior is accessible from the Application panel, Server Behaviors -> + -> MX Kollection -> Server-Side Includes -> Server-Side Includes From Table. The user interface has two tabs:

 

To set the dialog box options for the first tab, follow the next steps:

  1. In the Connection drop-down menu select the database connection defined for your site. If you don't have a connection yet, you can use the Define button and create one now.
  2. In the Table drop-down menu select the database table that contains the information needed when dynamically including files in the current page.
  3. In the URL parameter value drop-down menu select the table column that stores the URL parameter values.
    Note:
    If a table record has in the URL_pag column (where the URL parameter values are stored) no value entered, then the associated file will be loaded by default in browser.
    Note: If a table record has in the URL_pag column (where the URL parameter values are stored) the value 404, then the associated file will be automatically loaded when a page cannot be found (e.g. due to a missing page, or a wrong URL parameter value).
  4. In the Filename drop-down menu select the table column that stores the names of the files to be included (called, referred).
  5. In the Page title drop-down menu select the table column that stores the titles of the pages in browser (what goes in the HTML <title> tag).
  6. In the Meta keywords drop-down menu select the table column that contains the meta keywords for the included file.
  7. In the Meta description drop-down menu select the table column that contains the meta description for the included file.
  8. The three buttons in the top right corner of the interface offer you the next functionalities:
    · Click OK when you are done configuring the server behavior.
    · Click Cancel to exit without applying the new settings.
    · The Help button opens this help page.
    These buttons are common to both tabs of the Server-Side Includes From Table server behavior interface.
  9. Click on the Parameter tab to continue configuring the server behavior.
 

 

To set the dialog box options for the second tab, follow the next steps:

  1. In the URL parameter name text box enter the name of the URL parameter that you are going to use in your site pages. The default name given is mod.

  2. Click OK when you are done configuring the server behavior.

Before being able to see this server behavior at work, there are several things that need to be done in your current Dreamweaver page (let's consider this page being named includes.php):

Note: If you applied the Server-Side Includes From Table server behavior in your page, you cannot apply it again in the same page, and you cannot apply Server-Side Includes From List either.

 

If you want to use nice URL's for your included files, there are three things you should do:

For more details about the nice URL's and how they can be obtained, read the similar paragraphs in Server-Side Includes From List.