Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Dynamic Sign-in Query String

Dd548477.note(en-us,MSDN.10).gifNote:
This topic describes functionality that will be obsolete. This functionality is provided only to support legacy applications. Live Connect incorporates features that provide equivalent functionality.

One of the advantages of customizing your sign-in page is that you can dynamically modify the page. For example, you can change the sign-in page to showcase a particular promotion that is occurring for your site, or to reflect a particular holiday. To modify the sign-in page in this way, you append a string of variables—called a dynamic sign-in query string—to the sign-in URL on your site.

You build the dynamic sign-in query string by adding a wlcxt variable to the end of your sign-in URL. This variable contains a list of names, each of which corresponds to the ID attribute of a SiteLoginUIProperties XML element: Header, Title, Subtitle, ImageURL, and SSLImageURL. The Windows Live ID service uses these variables to look up the corresponding SiteLoginUIProperties element in your XML file and thus to locate the correct string or image to display.

Dd548477.note(en-us,MSDN.10).gifNote:
For more information about your site's XML configuration file, see Customizing the Sign-in Page.

To better understand how the dynamic sign-in query string works, consider the following subsection of an XML configuration file.

<siteloginuiproperties>
<Header id="default">STRID_WL_DEF_HEADER</Header>
<Title id="default">STRID_WL_DEF_TITLE</Title>
<Subtitle id="default">STRID_WL_DEF_SUBTITLE</Subtitle>
<ImageURL id="default">STRID_WL_DEF_IMAGEURL</ImageURL>
<SSLImageURL id="default">STRID_WL_DEF_SSLIMAGEURL</SSLImageURL>
</siteloginuiproperties>
<stringtable>
      <Language langID="en">
         <string id="STRID_WL_DEF_HEADER">
            Sign in with your Windows Live ID
         </string>
         <string id="STRID_WL_DEF_TITLE">Windows Live ID</string>
   <string id="STRID_WL_DEF_SUBTITLE"></string>
      <string id="STRID_WL_DEF_IMAGEURL"></string>
   <string id="STRID_WL_DEF_SSLIMAGEURL"></string>
   <string id="STRID_WL_DEF_IMAGEURL">
            www.fabrikam.com/myimage.jpg
         </string>
   <string id="STRID_WL_DEF_SSLIMAGEURL">
            www.fabrikam.com/myimage_ssl.jpg
         </string>
</Language>
</stringtable>

These elements define the default text and images that appear when a user clicks a sign-in link. However, if you have a sign-in link when users are trying to access their account details, you can modify the XML as shown in the following example.

<siteloginuiproperties>
   <Header id="default">STRID_WL_DEF_HEADER</Header>
   <Title id="default">STRID_WL_DEF_TITLE</Title>
   <Subtitle id="default">STRID_WL_DEF_SUBTITLE</Subtitle>
   <ImageURL id="default">STRID_WL_DEF_IMAGEURL</ImageURL>
   <SSLImageURL id="default">
      STRID_WL_DEF_SSLIMAGEURL
   </SSLImageURL>

   <Header id="var1">STRID_WL_VAR1_HEADER</Header>
   <Title id="var1">STRID_WL_VAR1_TITLE</Title>
   <Subtitle id="var1">STRID_WL_VAR1_SUBTITLE</Subtitle>
   <ImageURL id="var1">STRID_WL_VAR1_IMAGEURL</ImageURL>
   <SSLImageURL id="var1">STRID_WL_VAR1_SSLIMAGEURL</SSLImageURL>
</siteloginuiproperties>
<stringtable>
   <Language langID="en">
      <string id="STRID_WL_DEF_HEADER">
         Sign in with your Windows Live ID
      </string>
<string id="STRID_WL_DEF_TITLE">Windows Live ID</string>
<string id="STRID_WL_DEF_SUBTITLE">
         With Windows Live ID, you can access more services.
      </string>
<string id="STRID_WL_DEF_IMAGEURL">
         www.fabrikam.com/myimage.jpg
      </string>
<string id="STRID_WL_DEF_SSLIMAGEURL">
         www.fabrikam.com/myimage_ssl.jpg
      </string>

      <string id="STRID_WL_VAR1_HEADER">
         Sign in to access your account details
      </string>
      <string id="STRID_WL_VAR1_TITLE">
         Windows Live
      </string>
      <string id="STRID_WL_VAR1_SUBTITLE">
         We're ready to get started--just supply your Windows Live ID.
      </string> 
      <string id="STRID_WL_VAR1_IMAGEURL">
         www.fabrikam.com/myimage_var.jpg
      </string>
      <string id="STRID_WL_VAR1_SSLIMAGEURL">
         www.fabrikam.com/myimage_ssl_var.jpg
      </string>
   </Language>
</stringtable>

Now you have content that is appropriate for users who are accessing their account information. To have this content appear on the sign-in page, modify the sign-in URL as shown in the following example.

https://login.live.com/login.srf?id=...&wlcxt=$var1$var1$var1$var1

When a user clicks this link, the alternate text appears on the sign-in page.

There is no limit to the custom options that you can add to your XML file. However, make sure that your dynamic query string contains each variable in the following order:

  1. Title
  2. Subtitle 
  3. ImageURL or SSLImageURL (depending on which protocol is used) 
  4. Header

Also, if you want to use a default value for some elements, you must identify them by using the ID attribute that you used in the XML file for that element. The following table illustrates different ways of constructing the sign-in URL.

Value of wlcxt Description

wlcxt=var1

The Title uses var1; the rest use default values.

wlcxt=$$$var1

The Header uses var1; the rest use default values.

wlcxt=default$var1$var1$var1

The Subtitle, ImageURL, and Header all use var1 values; the Title uses default values.

Other Resources

Live Connect

Show:
© 2015 Microsoft