Show If User Is Logged In

The purpose of this server behavior is to allow the display of a specific region only when a user is logged on, and/or has a certain level of access. Before applying it, select a region containing data in Dreamweaver's editable area. If the region is empty, an error message will pop-up requesting to select some data.

You can access this server behavior from the Application panel, Server Behaviors -> + -> MX Kollection -> Conditional Regions -> Show If User Is Logged In.

The user interface has two tabs. Directions about their correct configuration are given below.

 

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

  1. In the Restrict based on radio group, decide what to take into account when verifying the user: the username and password only, or also the access level:
    · If you only need the Username and password, select the associated radio button.
    · If you need the Username, password and access level, select the corresponding radio button in this case.

  2. When the second radio button is selected, the Select level(s) list is enabled, allowing the selection of the desired level(s). The values selected here (multiple select is possible) must be matched by the ones in the user's properties, when attempting access, in order to display the selected region.

  3. The available levels are configured in the Login settings section of the InterAKT Control Panel. You can access it directly by clicking the Login Settings button (in case you want to make some changes or to view the current settings).

  4. If in need of displaying another region when the condition is not met (the user is not logged in, or does not have the proper level), check the Has ELSE option. In this case, you will have to replace the Else text: replace this with the content that should appear when the user is not logged in or does not have the required access level.

  5. 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 Show If User Is Logged In server behavior interface.

  6. Click on the Advanced tab to continue with configuring the server behavior.

 

 

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

  1. In the Name text-box enter a name for the conditional region; this name must be unique on page. Change the default name only if you are certain that no other element has the same name. If you do not have any special requirements regarding the region's name, you can skip configuring this tab.
  2. The Has ELSE checkbox has the same functionality as the one in the Basic tab, allowing the display of another region if the field does changes.
  3. Click OK when you are done configuring the server behavior.
 

After applying this server behavior, at least one translator is shown on page: the one surrounding the initial region. If the Has ELSE option has been checked, then a second translator containing a bogus content ("ELSE text: Replace this") will be displayed. Replace this bogus content with the one you want to display when the user is not logged it or does not have the access rights.

In order to add/remove the ELSE region, simply edit the existing Show If User Is Logged In server behavior from the Server Behaviors tab. When removing an ELSE region, its content will be added after the IF region's content.