Common Data


Data available to all pages

We call common data to that data available in all pages. You can access and print this data using the following DotLiquid syntax:

{{ data.NameOfTheData }} #prints the value of a piece of data named "NameOfTheData"

For example, to print the name of the space, you can do the following:

{{ data.Business.Name }} #prints the name of your space

You can use this within normal HTML code, for example:

<h1>{{ data.Business.Name }}</h1>

Common Data

The following data is available in all pages. This means that you can use and print these values in any of the pages of the space website.


data.Business

Provides access to the details of your space, such as its name and contact details

{{ data.Business.Name                }}
{{ data.Business.WebAddress          }}
{{ data.Business.Address             }}
{{ data.Business.Phone               }}
{{ data.Business.Fax                 }}
{{ data.Business.EmailContact        }}
{{ data.Business.WebContact          }}
{{ data.Business.Country             }}
{{ data.Business.Currency            }}
{{ data.Business.SimpleTimeZone      }}
{{ data.Business.AboutUs             }}
{{ data.Business.ShortIntroduction   }}
{{ data.Business.BillingName         }}
{{ data.Business.BillingAddress      }}
{{ data.Business.BillingCity         }}
{{ data.Business.BillingPostCode     }}
{{ data.Business.BillingBankName     }}
{{ data.Business.BillingAccountCode  }}
{{ data.Business.BillingSortCode     }}
{{ data.Business.HasLogo             }}

data.User

Provides access to the details of the user logged in

{{ data.User.FullName            }} #the full name of the member
{{ data.User.Email               }} #the login email address of the member
{{ data.User.Coworker            }} #the details of the member associated with the user
{{ data.User.Businesses          }} #the list of spaces the users is registered with
{{ data.User.IsAuthenticated     }} #indicates if there is a user currently logged in

data.Coworker

Provides access to the member details currently logged in

{{ data.Coworker.FullName                         }}
{{ data.Coworker.Address                          }}
{{ data.Coworker.PostCode                         }}
{{ data.Coworker.CityName                         }}
{{ data.Coworker.State                            }}
{{ data.Coworker.Email                            }}
{{ data.Coworker.Country.Name                     }}
{{ data.Coworker.SimpleTimeZone.Name              }}
{{ data.Coworker.SimpleTimeZone.UsesSummerTime    }}
{{ data.Coworker.SimpleTimeZone.OffsetInMinutes   }}
{{ data.Coworker.Notes                            }}
{{ data.Coworker.NextInvoice                      }}
{{ data.Coworker.User                             }}
{{ data.Coworker.Tariff                           }}
{{ data.Coworker.Tariff.Name                      }}
{{ data.Coworker.Tariff.Description               }}
{{ data.Coworker.Tariff.TermsAndConditions        }}
{{ data.Coworker.Tariff.Price                     }}
{{ data.Coworker.Tariff.Currency                  }}
{{ data.Coworker.Tariff.Currency.Name             }}
{{ data.Coworker.Tariff.Currency.Code             }}
{{ data.Coworker.Tariff.Currency.Format           }}
{{ data.Coworker.Tariff.InvoiceEvery              }}
{{ data.Coworker.NextTariff                       }}
{{ data.Coworker.Businesses                       }}
{{ data.Coworker.TimePasses                       }}
{{ data.Coworker.ExtraServices                    }}
{{ data.Coworker.MobilePhone                      }}
{{ data.Coworker.LandLine                         }}
{{ data.Coworker.NickName                         }}
{{ data.Coworker.BusinessArea                     }}
{{ data.Coworker.CompanyName                      }}
{{ data.Coworker.ProfileTags                      }}
{{ data.Coworker.ProfileTagsSpaces                }}
{{ data.Coworker.ProfileTagsList                  }}
{{ data.Coworker.ProfileSummary                   }}
{{ data.Coworker.ProfileWebsite                   }}
{{ data.Coworker.Url                              }}
{{ data.Coworker.Gender                           }}
{{ data.Coworker.ProfileIsPublic                  }}
{{ data.Coworker.Twitter                          }}
{{ data.Coworker.Skype                            }}
{{ data.Coworker.Facebook                         }}
{{ data.Coworker.Linkedin                         }}
{{ data.Coworker.HasContactDetails                }}

data.Wall

Provides access to the list of messages in the wall.

{{ data.Wall[..].FromUser    }}
{{ data.Wall[..].MessageText }}

This is a list, if you want to cycle throught each of the items in it use the following code:

{% for item in data.Wall %}
  <p>{{ item.MessageText | StripHtml | MarkDown }}</p>
{% endfor %}

data.Languages

Provides access to the list of languages available in your account.

{{ data.Languages[..].Name     }}
{{ data.Languages[..].Culture  }}

This is a list, if you want to cycle throught each of the items in it use the following code:

{% for item in data.Languages %}
  <p>{{ item.Name }}</p>
{% endfor %}

data.CustomTemplates

Provides access to the list of custom pages available for the currently selected language.

{{ data.CustomTemplates[..].Name                  }}
{{ data.CustomTemplates[..].Permalink             }}
{{ data.CustomTemplates[..].IsPasswordProtected   }}

This is a list, if you want to cycle throught each of the items in it you can use the following code:

{% for t in data.CustomTemplates %}
<li>
  <a href="{% Url Page, Index, name: t.Permalink %}">
    {{ t.Name | Replace: '.htm', '' }}
  </a>
</li>
{% endfor %}

data.Resources

Provides access to the list of resources in the space. Only those resources marked as "Visible" are included in this list.

{{ data.Resources[..].Name                  }}
{{ data.Resources[..].Description           }}
{{ data.Resources[..].ResourceTypeName      }}
{{ data.Resources[..].TimeSlots             }}
{{ data.Resources[..].HasImage              }}
{{ data.Resources[..].Projector             }}
{{ data.Resources[..].Internet              }}
{{ data.Resources[..].ConferencePhone       }}
{{ data.Resources[..].StandardPhone         }}
{{ data.Resources[..].WhiteBoard            }}
{{ data.Resources[..].LargeDisplay          }}
{{ data.Resources[..].Catering              }}
{{ data.Resources[..].TeaAndCoffee          }}
{{ data.Resources[..].Drinks                }}
{{ data.Resources[..].SecurityLock          }}
{{ data.Resources[..].CCTV                  }}
{{ data.Resources[..].VoiceRecorder         }}
{{ data.Resources[..].AirConditioning       }}
{{ data.Resources[..].Heating               }}
{{ data.Resources[..].NaturalLight          }}
{{ data.Resources[..].AllowMultipleBookings }}
{{ data.Resources[..].Allocation            }}

This is a list, if you want to cycle throught each of the items in it you can use some code like this:

{% for resource in data.Resources %}
  <p><strong>{{ resource.Name }}<strong></p>
  <p>
    {{ resource.Description }}
  </p>
{% endfor %}

Messages

Sometimes, Nexudus Spaces will generate messages to be displayed to the user. These messages can be informational, about an error or indicating that an operation was performed successfully.

{{ data.InfoMessage     }}
{{ data.ErrorMessage    }}
{{ data.SuccessMessage  }}
{{ data.HasMessage      }} #indicates if there is a message to be displayed

You can use the following code to display messages to the user:

{% if data.InfoMessage != "" %}
  <p class="message info">{{data.InfoMessage}}</p>
{% endif %}
{% if data.ErrorMessage != "" %}
  <p class="message error">{{data.ErrorMessage}}</p>
{% endif %}
{% if data.SuccessMessage != "" %}
  <p class="message success">{{data.SuccessMessage}}</p>
{% endif %}

Other details

{{ data.Language          }} #gets the code of the current language (en, es, fr, ...)
{{ data.UserIsLoggedIn    }} #indicates if the user currently logged in
{{ data.Now               }} #gets the current time of the server
{{ data.UtcNow            }} #gets the current time of the server as UTC
{{ data.ShortDatePattern  }} #gets the format for short dates in the current language
{{ data.ShortTimePattern  }} #gets the format for short times in the current language


Source: XML ! RSS