decorative banner

Understanding content sources


    A content source is a query of a data source, and provides content at the time a page is served. A page can have one or more content sources. A content source's available fields appear in various pop-up menus on the Dynamic Bindings palette. These fields can be bound to elements on the page.

    There are a number of different types of content sources. The most common is a database query that gets information from a database and makes it available for use on the page. The different types of content sources are:

    ADO Database Query in ASP only, JDBC Database Query in JSP only, and MySQL Database Query in PHP only:

    Looks in a specific database and gets records from a specific table or query. The content source can also filter records using tests for field values or using custom SQL WHERE clauses. The content source can also specify a sort order for the records. Database updates can also be submitted based on a content source.

    XML Data Source in any language

    Supplies elements and attributes from XML. Depending on how the XML data source is configured, it can return one record or many records.

    Navigation Block View in any language

    Supplies a series of records describing blocks of records returned by another content source. Used for building page navigation in result record sets.

    Custom Merchant Shopping Cart in any language

    Manages records describing the contents of a shopping cart.

    Custom Merchant Order Form in any language

    Manages a record describing contents of an order form.

    GoLive lets you fine-tune SQL content sources by applying various filters, sorts, or custom SQL to the basic content source. You might use a filter, for example, to create a recordset that includes employees only from a specific department, or DVDs of a specific genre such as SCI-FI. You could apply a sort that sorts a recordset of employees, for example, by Hire Date, rather than by last name or ID number. Custom SQL gives you even greater freedom. You could place an SQL statement on a results page that uses a value passed to it from a search page to show, for example, all employees earning a specific salary or greater.

    Note: If you have a complex query, it is usually better to create it within your database application itself rather than to place the query on a Web page. Performance is likely to be better, the query is available to all pages, and the database application probably has helpful tools for developing the query.