Locations
Summary
Examples
Basic usage
Notice the use of @item.GetValue to get data from the loop variable.
If you just write @GetValue, the data will be taken from outside the loop.
Similarly, you have to use @item.GetLoop to use loops inside a loop.
<table>
<tr>
@foreach (LoopItem item in GetLoop("Locations") {
<td> @item.GetValue("Relevant.Tag") </td>
}
</tr>
</table>
Check if the loop exists
@if (Loops.Contains("Locations")) {
...
}
Example of usage
The following general example illustrates how to use a loop construct.
<table>
<!--@LoopStart(Locations)-->
<tr>
<td><!--@Loop:Tag--></td>
</tr>
<!--LoopEnd(Locations)-->
</table>
Check if the loop exists
<!--@If LoopDefined(Locations)-->
...
<!--@EndIf(Locations)-->
Available tags
Returns the user ID.
RAZOR
@GetInteger("AccessUserID")
HTML
<!--@AccessUserID-->
Returns the address of the user.
RAZOR
@GetString("Address")
Returns the second address of the user.
RAZOR
@GetString("Address2")
Returns the city of the user.
Returns the company of the user.
RAZOR
@GetString("Company")
Returns the country of the user.
RAZOR
@GetString("Country")
Returns the currency of the user.
RAZOR
@GetString("Currency")
Returns the content of the user custom field.
RAZOR
@GetString("Custom.AccessUser_[UserCustomFieldSystemName]")
HTML
<!--@Custom.AccessUser_[UserCustomFieldSystemName]-->
Returns the name of the user custom field.
RAZOR
@GetString("Custom.AccessUser_[UserCustomFieldSystemName].Name")
HTML
<!--@Custom.AccessUser_[UserCustomFieldSystemName].Name-->
Returns the type of the custom field.
RAZOR
@GetString("Custom.AccessUser_[UserCustomFieldSystemName].Type")
HTML
<!--@Custom.AccessUser_[UserCustomFieldSystemName].Type-->
Returns the number of user custom fields.
RAZOR
@GetInteger("Custom.CustomFieldsCount")
HTML
<!--@Custom.CustomFieldsCount-->
Returns the customer number of the user.
RAZOR
@GetString("CustomerNumber")
HTML
<!--@CustomerNumber-->
Returns the department of the user.
RAZOR
@GetString("Department")
Returns the e-mail address of the user.
RAZOR
@GetString("Email")
Returns the ID imported from an external source.
RAZOR
@GetString("ExternalId")
Returns the fax number of the user.
Returns the first name of the user.
RAZOR
@GetString("FirstName")
Returns string constains location group IDs separated with comma, based on values of Location Groups control in the module paragraph settings.
RAZOR
@GetString("GroupIDList")
Returns the house number for the user.
RAZOR
@GetString("HouseNumber")
Returns the job title of the user.
RAZOR
@GetString("JobTitle")
Returns the last name of the user.
RAZOR
@GetString("LastName")
Returns the geolocation latitude of the user.
Returns the Geolocation longitude for the user.
Returns the middle name of the user.
RAZOR
@GetString("MiddleName")
Returns the name of the user.
Returns the phone number of the user.
RAZOR
@GetString("Phone")
Returns the business phone number of the user.
RAZOR
@GetString("PhoneBusiness")
HTML
<!--@PhoneBusiness-->
Returns the mobile phone number of the user.
RAZOR
@GetString("PhoneMobile")
Returns the private phone number of the user.
RAZOR
@GetString("PhonePrivate")
HTML
<!--@PhonePrivate-->
Returns the state or region of the user.
RAZOR
@GetString("State")
Returns the tiltle of the user.
RAZOR
@GetString("Title")
Returns the user ID.
RAZOR
@GetInteger("UserID")
Returns the customer's company tax registration number/VAT identification number (VATIN) also called CVR in Denmark and VatRegNumber in United Kingdom.
RAZOR
@GetString("VatRegNumber")
HTML
<!--@VatRegNumber-->
Returns the zip code of the user.
Available loops
Returns the name of the custom field.
RAZOR
@foreach (LoopItem item in GetLoop("Custom.CustomFields")){
<p>@item.GetValue("TagName")</p>
}
HTML
<!--@LoopStart(Custom.CustomFields)-->
<p>@TagName</p>
<!--@LoopEnd(Custom.CustomFields)-->
Groups
RAZOR
@foreach (LoopItem item in GetLoop("Groups")){
<p>@item.GetValue("TagName")</p>
}
HTML
<!--@LoopStart(Groups)-->
<p>@TagName</p>
<!--@LoopEnd(Groups)-->