Skip to content

Login page template

A sign-in page template contains access information and forms required for users to sign in to your network through a hotspot.

Variables

Login pages are written in HTML and contain variables replaced during page generation. You can also create conditional blocks rendered only when specified conditions are met. See the sign-in page template in Wireless > Hotspot settings > Download templates for usage examples.

You can use the following variables in your template.

  • <?admin_message?>: “For administrative questions please contact:”
  • <?admin_contact?>: Send notifications to email address as defined in Administration > Notification settings.
  • <?asset_path?>: Directory in which images and stylesheets are stored for full customization. Example:<img src="<?asset_path?>/logo.png">.
  • <?company_logo?>: The logo used in basic customization as defined in Wireless > Hotspots.
  • <?company_text?>: Default company text as defined in Wireless > Hotspots.
  • <?error?>: The error message returned when attempting to sign in.
  • <?location?>: The URL requested by the user.
  • <?location_host?>: The hostname of the URL requested by the user.
  • <?login_form?>: Login form suitable for the hotspot type, for example, username and password text boxes, a token text box, or an Accept check box.
  • <?maclimit?>: Number of devices allowed per voucher as defined in Wireless > Hotspots.
  • <?numdevices?>: Number of devices that can use the voucher as defined in the template.
  • <?redirect_host?>: Redirect URL as defined in Wireless > Hotspots.
  • <?terms?>: Terms of use as defined in Wireless > Hotspots.
  • <?time_total?>: Total time quota allowed by the voucher as defined in Wireless > Hotspot voucher definition.
  • <?timeend?>: Validity period specified by the voucher as defined in Wireless > Hotspot voucher definition.
  • <?traffic_total?>: Total data volume allowed by the voucher as defined in Wireless > Hotspot voucher definition.

You can use the following variables to show certain sections based on hotspot settings, user inputs, or sign-in events:

  • <?if_loggedin?>: Show this section when the user has successfully logged in.
  • <?if_notloggedin?>: Show this section when the user hasn't yet logged in, for example, because terms of use must be accepted or an error occurred.
  • <?if_authtype_password?>: Show this section when the hotspot type is Password of the day.
  • <?if_authtype_disclaimer?>: Show this section when the hotspot type is Terms of use acceptance.
  • <?if_authtype_token?>: Show this section when the hotspot type is Voucher.
  • <?if_location?>: Show this section when the user is redirected.
  • <?if_redirect_url?>: Show this section when Redirect to URL after login is on.
  • <?if_not_redirect_url?>: Show this section when Redirect to URL after login is off.
  • <?if_timelimit?>: Show this section when a voucher has a validity period.
  • <?if_trafficlimit?>: Show this section when a voucher has a data limit.
  • <?if_timequota?>: Show this section when a voucher has a time quota.
  • <?if_maclimit?>: Show this section when a Devices per voucher value is specified.
  • <?if_terms?>: Show this section when Terms of use is turned on and terms are defined.
  • <?if_error?>: Show this section when an error occurs while signing in.

Custom sign-in forms

You can create a custom sign-in form instead of using the pre-defined <?login_form?> variable.

Enclose the form in the following tags:

<form action="?action=login" method="POST">  ...  </form>

For a “Terms of acceptance” hotspot, add an accept check box:

<input type="checkbox" name="accept" value="true">

For a “Password of the day” or voucher hotspot, add a token text box:

<input type="text" name="token">

Add a means to submit the form, for example, a sign-in button:

<input type="submit" name="sign-in" value="Sign in">