Back to blog

 

09 Jun 2016

Displaying how many years you've been in business

We've been in business for 25 years. It's a phrase you see very often. Running a business is hard work. Pride in its longevity is something we naturally like to shout about. More importantly we know it inspires consumer trust in our business' stability and its ability to adapt over time. 

The problem

Displaying the age of your business will go out of date. How many "we've been in business for ..." statements out there are wildly inaccurate because they've remained unedited? To get around the problem you'll often find statements like "we've been in business for more than a decade", or a variation on the theme. But, it's not really a solution. 

The solution

Using some very simple EVML code you can accurately display the age of your business. It'll work anywhere within your website's layouts, templates or even from within an editable region in Evance's content management system. Here's the code:


    {{ date().year - 1999 }}

You'll probably notice that 1999 was 25 years ago. It's no coincidence that we've used this example as it's how long we've been in business. All you have to do is replace 1999 with the year you started your business. 

Note: you will need be logged out of Evance's CMS to view the result on your website. A simple solution to this is to use two different web browsers - edit in one and view the result in the other. 

Further reading

This method of displaying your business' age uses Evance's EVML template language. You may wish to read more about EVML Output Tags (these are the curly brackets {{ .. }} containing the code) or EVML Date Object.


  Tagged as : Features and Updates