decorative banner

Creating conditional regions


    You can create dynamic content on a page that is shown or hidden depending on set conditions. For example, you may have a page that lets viewers search your online database of products. Clicking a button on the page displays the results of a query. If there are results, you want them displayed, but if there are no results, you want to display a message saying "Your query didn't find anything, try..." or "This item is currently out of stock." In short, you use conditional regions to hide or show content based on specified conditions.

    Condition (Parameter)

    Description

    If first record

    (Content Source)

    True if the current record is the first record.

    If last record

    (Content Source)

    True if the current record is the last record.

    If no records

    (Content Source)

    True if there are no records in the recordset.

    If many records

    (Content Source)

    (Number of Records)

    True if there are more than x, a certain number of records in the recordset.

    If field has error

    (Content Source)

    (Field)

    True if the indicated field's value has an error.

    If field matches

    (Content Source)

    (Field)

    (Condition)

    (Value)

    True if a fields matches some criteria.

    Always

    Always true.

    Custom

    (Expression)

    True if the native scripting-code expression evaluates to true. Used to enter custom expressions.

    Note: The conditions are customizable through the SDK available in the GoLive installation folder.

To create a region on a Web page that is shown or hidden according to specific conditions:

  1. Drag the Hide Content object from the Dynamic Content set of the Objects palette to the document page.
  2. Select the Show or Hide option on the Dynamic Bindings palette.
  3. Choose and define a condition from the pop-up menu.
  4. Enter any desired text or images (real or placeholder) in the Hide Content object.
  5. Bind placeholders, if any, to a field in a content source, using the Dynamic Bindings palette.