Global Variables per Site

Ability to define global key/value variables (data type: strings, integers and dates) that can be used throughout a webflow site.

Use Case:
A company phone number that is used in multiple symbols throughout a design.

  • Tim Daff
  • Aug 2 2018
  • Reviewed
  • Lawrence Howlett commented
    10 Jul 06:46

    This is a must for things like APR's, or prices that you want to change in just one place to make it easier to manage the entire site

  • Klara Prettl commented
    25 May 15:43

    Please make it!

  • Jeff Berube commented
    18 May 16:38

    Since I can't vote again, I'm just gonna comment again. This is desperately needed and should be simple enough to implement.

  • Jeff Berube commented
    17 Feb 22:41

    This is very needed so that clients can edit these themselves in the editor.

  • Gordon Evans commented
    January 11, 2023 04:34

    This is so needed for things like centralized emails, phone numbers, etc.

  • Earl Varona commented
    October 16, 2022 16:11

    Yes! This feature will allow clients to change their phone numbers, email addresses, etc., in one place and automatically change every element that is referencing to them.

  • Michael Wells commented
    September 25, 2022 10:37

    To my last comment, adding API to the needs for get/set these vars. Which of course means, Logic as well.

    The use case I'm currently facing is a requirement to generate aggregateRating JSON+LD markup. Ratings are in a collection, and all are scored, but there's no internal way to get an average and bind it into my markup.

    I can have that calculated externally through Zapier/Make or hopefully via Logic someday, but where to store the resulting average value? It needs to go into a global var that I can then include in my site.

  • Michael Wells commented
    September 25, 2022 08:30

    NICE. I just came here looking to add this wishlist item.

    Ideally these vars will need to be strongly typed, e.g.;

    • strings, e.g. for site name

    • emails, e.g. for support@mycompany.com

    • numbers, e.g. "X" customers served

    • phone numbers

    • measurements, especially to support Interactions, where several different parts of an animation need the same measurements e.g. open/close animations

    • timing durations, also for animations

    We'd want the ability to reference these variables from;

    • Designer elements, as appropriate for content, links, emails, default input values, etc.

    • Page config elements, like {{ var.sitename }} in Page titles

    • Scripts, via webflow.js

    Related - https://wishlist.webflow.com/ideas/WEBFLOW-I-1787

  • Jacky Choo commented
    June 16, 2022 03:41

    This is going to be useful for us, we have 2 sites (1 for staging, 1 for production) for each of the env i would like to add redirection link to its specific env, eg.

    • Staging -> Staging

    • Prod -> Prod

    Tested the design in staging, export and import to Prod

    With env variables set for the redirect link domain, it doesn't impact the link(reference to global variable), when I export and import my pages from Staging to Prod

    Currently we have to update the link manually everytime.

  • Patina Photo commented
    September 23, 2021 04:24

    Another use case: for pricing info

    e.g. we often mention starting prices for products and service in our copy all across our site (where a CMS or symbol doesn't make sense). It would be great to have this updatable from one location.

  • Ron Ferrell commented
    June 30, 2021 02:33

    I have found a way to do this realtively easily with JavScript and I SUCK at Javascript. I have a snippet of Javascript that changes the Copyright Date on everypagel. Every year it will update itsef. I tried this with just using the company name and it works. It is done on page load so I am not sure the SEO implications/impact. Also this is great for pricing if you do not have enough items to warrant a CMS site - I.E. I have a customer that has one product and is going to sell via PayPal but I want to be able to advertise the price everywhere and not have to worry about changing 50 places or missing one change down the road.

    I am not sure I can paste the code in here so message me and I will send it to you.

  • Michael Wells commented
    December 22, 2020 05:14

    This can be done in a very crude way, using a JSON chunk in your site header, and script to search/replace specific areas you want to apply it. But that's very ugly and prevents clients from managing those variables through the Editor interface.

    I have a similar need for popup notifications, with a chunk of richtext and the ability to turn that alert on/off.

  • Rickard Lindgren commented
    June 17, 2020 10:17

    Yes please

  • TRU MRK Agency commented
    January 29, 2020 14:48

    Reallllly need this one. Any update? If not, can this be achieved by a script?

  • Justin Maxwell commented
    November 20, 2019 22:32

    Is there any way we could do a workaround on this with the CMS?

  • Justin Maxwell commented
    November 20, 2019 22:31

    Yes, please

  • Chris Brewer commented
    May 03, 2019 20:02

    More Use Cases:

    • Company Name
    • Company Address
    • [named] Email Address
  • Tim Daff commented
    November 07, 2018 00:36
  • +39