Subscribe for updates

Global variables

Easy Eatery makes a large amount of data available within every HTML file in your theme, which we call 'global variables'.

How do I use global variables?

You use global variables in the same way as you would any other variable; wrap the name of the variable within curly brackets, with an '@' symbol before the variable name, for example, {@globals.site.name}

Example usage of variable tags - this HTML renders as the warning message below. Please note that the example global variable, {@globals.theme.url} has since been depracated in Easy Eatery.
<!-- KB BLOCK: WARN -->
<section class="warn">
	<message-wrapper>
		<icon-wrapper>
			<img data-src="{@globals.theme.url}img/icon-hint.svg" alt="" />
		</icon-wrapper>
		<strong class="h5">{@title}</strong>
		{@text}
	</message-wrapper>
</section>
Don't hard code content - use variables instead.

Avoid 'hard-coding' content within the HTML of your theme whenever possible. Instead, rely on variables whenever you can to bring in content. Doing so will avoid scenarios where you need to edit your site's theme to change a piece of information that should be manageable within your Easy Eatery control panel.

Global variables

The sections below contain a comprehensive list of current global variables.

Website details:

Variable Description
{@globals.site.name}

The name of the website - uses the value of the 'business name' field within the 'business settings' page.

{@globals.site.url}

The URL of your website's homepage.

{@globals.site.url.encoded}

The URL of your website's homepage, in a URL-encoded format.

{@globals.site.currency}

The symbol for the active currency on your website.

{globals.page.class}

A collection of CSS classes that help identify the current page being viewed.

{@globals.page.title}

The name of the current page.

Copyright details

The values that these variables output can be managed in 'Business settings' within your account control panel.

Variable Description
{@globals.company.copyright}

A pre-built copyright notice which uses the 'Copyright holder' field.

{@globals.company.founded}

Outputs the year that the company running the Easy Eatery website was founded.

Contact details:

The values that these variables output can be managed in 'Business settings' within your account control panel.

Variable Description
{@globals.phone}

Outputs the contact telephone number, with formatting maintained. Output in an encoded format in order to help mask the value of this variable from bots.

{@globals.phone.unformatted}

Outputs the contact telephone number, with all formatting removed. Output in an encoded format in order to help mask the value of this variable from bots.

{@globals.email}

Outputs the contact email address. Output in an encoded format in order to help mask the value of this variable from bots.

Address details:

The values that these variables output can be managed in 'Business settings' within your account control panel.

Variable Description
{@globals.address}

All available lines of the business address, output with line breaks between each line of the address.

{@globals.address.inline}

All available lines of the business address, output on a single line.

{@globals.address.nocountry}

All available lines of the business address — except the country — output with line breaks between each line of the address.

{@globals.address.nocountry.inline}

All available lines of the business address — except the country — output on a single line

{@globals.address.line1}

The first line of the address, if provided.

{@globals.address.line2}

The second line of the address, if provided.

{@globals.address.city}

The city field of the address, if provided.

{@globals.address.region}

The region field of the address, if provided.

{@globals.address.postcode}

The postcode field of the address, if provided.

{@globals.address.country}

The country field of the address, if provided.

{@globals.address.lat}

The latitude of the map marker.

{@globals.address.lon}

The longitude of the map marker.

{@globals.address.directions}

An auto-generated Google Maps directions URL, which uses the lat/lon co-ordinates of the map marker as the destination.

Opening hours and serving times:

The values that these variables output can be managed in 'Business settings' within your account control panel.

Variable Description:
{@globals.opening-hours}

Outputs the opening hours for the business, within a HTML 'description list'.

{@globals.opening-hours.json}

Outputs the opening hours in a base64 encoded JSON format, which can be decoded and parsed for use.

{@globals.serving-times}

Outputs the serving times for the business, within a HTML 'description list'.

{@globals.serving-times.json}

Outputs the serving times in a base64 encoded JSON format, which can be decoded and parsed for use.

Social media links:

The values that these variables output can be managed in 'Business settings' within your account control panel.

Variable Description
{@globals.social}

A full list of all social media links, including review sites and food-ordering services, with SVG icons.

{@globals.social.links}

A full list of all social media links, including review sites, with SVG icons. Excludes food ordering services.

{@globals.social.links.twitter}

The URL of the business' Twitter profile.

{@globals.social.links.facebook}

The URL of the business' Facebook page.

{@globals.social.links.google}

The URL of the business' Google Business profile.

{@globals.social.links.happycow}

The URL of the business' profile on Happy Cow.

{@globals.social.links.instagram}

The URL of the business' Instagram profile.

{@globals.social.links.youtube}

The URL of the business' YouTube channel.

{@globals.social.links.tripadvisor}

A plain-text URL, as provided to this locations' profile on Trip Advisor.

{@globals.social.links.html.twitter}

A pre-rendered HTML for a link to this locations' Twitter profile, including an SVG icon.

{@globals.social.links.html.facebook}

A pre-rendered HTML for a link to this locations' Facebook page, including an SVG icon.

{@globals.social.links.html.google}

A pre-rendered HTML for a link to this locations' Google Business profile, including an SVG icon.

{@globals.social.links.html.happycow}

A pre-rendered HTML for a link the business' profile on Happy Cow, including an SVG icon. 

{@globals.social.links.html.instagram}

A pre-rendered HTML for a link to this locations' Instagram feed, including an SVG icon.

{@globals.social.links.html.youtube}

A pre-rendered HTML for a link to this locations' YouTube channel, including an SVG icon.

{@globals.social.links.html.tripadvisor}

A pre-rendered HTML for a link to this locations' profile on Trip Advisor, including an SVG icon.

Food ordering service links:

The values that these variables output can be managed in 'Business settings' within your account control panel.

Variable Description
{@globals.social.food}

A full list of all food ordering service links, with SVG icons.

{@globals.social.food.deliveroo}

The URL of the business' page on Deliveroo.

{@globals.social.food.food_hub}

The URL of the business' page on Food Hub.

{@globals.social.food.kukd}

The URL of the business' page on Kukd.

{@globals.social.food.just_eat}

The URL of the business' page on Just Eat.

{@globals.social.food.uber_eats}

The URL of the business' page on Uber Eats.

{@globals.social.food.html.deliveroo}

A pre-rendered HTML for a link to the business' page on Deliveroo, including an SVG icon.

{@globals.social.food.html.food_hub}

A pre-rendered HTML for a link to the business' page on Food Hub, including an SVG icon.

{@globals.social.food.html.kukd}

A pre-rendered HTML for a link to the business' page on Kukd, including an SVG icon.

{@globals.social.food.html.just_eat}

A pre-rendered HTML for a link to the business' page on Just Eat, including an SVG icon.

{@globals.social.food.html.uber_eats}

A pre-rendered HTML for a link to the business' page on Uber Eats, including an SVG icon.

Food standards:

We encourage our customers to strive for the best in food safety standards and so we make it easy for them to display their current rating on their website. Site owners can turn this feature on or off at any time. When disabled, the following variables not output any content.

The values that these variables output can be managed in 'Business settings' within your account control panel.

Variable Description
{@globals.food-standards}

A pre-rendered HTML link, which displays the selected food standards rating image and goes to the business' profile on food.gov.uk when clicked.

{@globals.food-standards.url}

The URL of the business' profile on food.gov.uk.

{@globals.food-standards.rating}

The food safety standards rating, output as a number.

{@globals.food-standards.badge}

The URL of the SVG icon of the assigned safety standards rating.

Honesty is the best policy

If your business isn't scoring a perfect 5 out of 5 right now - that's not the end of the World. Don't be dishonest about your rating however. Its very easy for anyone to find out how your business scores, via a quick search on https://www.food.gov.uk/

Still can't find what you're looking for?

Contact support
Search our knowledge base