{module_whosloggedin}

Description

Displays the name of the contact that's currently logged in and it also displays the Log Out link. If the contact is not logged in the module will display "No one logged in. [Log in]"

Syntax

{module_whosloggedin loginUrl="/module_render/module_case" logoutRedirUrl="/home" collection="my_custom_collection_name" template=""}

Note: When using named parameters always wrap the individual parameters in double quotes. Also, do note that modules using named parameters do not work for campaigns just yet.

Parameters

  • loginUrl - is the page you want to send the customer to when they click on [Log in] link.
  • logoutRedirUrl - is the page you want to send the customer to when they click on [Log in] link.
  • collection - use this if you need to access the module's Liquid output tags
  • template - this module does not support custom templates. You can use the template parameter however to supress the module's output

This module can be rendered:

  • in plain text
  • using Liquid collections - this is the Liquid output tag you can use - my_custom_collection_name.title

Examples

  • {module_whosloggedin loginUrl="/loginpage.htm"}
    • when customer logged in - "John Smith logged in. <a href="/LogOutProcess.aspx">Log out</a>"
    • when customer not logged in - "No one logged in. <a href="/loginpage.html">Log in</a>"
    {module_whosloggedin}
    • when customer logged in - "John Smith logged in. <a href="/LogOutProcess.aspx">Log out</a>"
    • when customer not logged in - "No one logged in."
  • {module_whosloggedin loginUrl="/cases" logoutRedirUrl="/home" collection="my_custom_collection_name" template=""} - in this case nothing will be displayed, however the module's Liquid tags will become available in the collection1 collection.

Syntax

{module_whosloggedin,loginUrl,logoutRedirUrl}

Parameters

  • loginUrl - is the page you want to send the customer to when they click on [Log in] link.
  • logoutRedirUrl - is the page you want to send the customer to when they click on [Log in] link.

Examples

{module_whosloggedin,/loginpage.htm}
  • when customer logged in - "John Smith logged in. <a href="/LogOutProcess.aspx">Log out</a>"
  • when customer not logged in - "No one logged in. <a href="/loginpage.html">Log in</a>"
{module_whosloggedin}
  • when customer logged in - "John Smith logged in. <a href="/LogOutProcess.aspx">Log out</a>"
  • when customer not logged in - "No one logged in."