powered by

FTD

How To

How to Use FTD Variable in JavaScript

If we have created a new FTD variable, then how to use that variable in JavaScript.

So we have a file ftd::ftd.js, in this file we have window.ftd JavaScript object. This object contains function get_value(id, variable_name). SO get the value of the variable we have to call this function with id: main.

E.g:

Let’s we want to get the value of variable ftd#markdown-color.link.light. We can use below function to get this.

window.ftd.get_value("main", "ftd#markdown-color.link.light")

FTD

How to Use FTD Variable in JavaScript

If we have created a new FTD variable, then how to use that variable in JavaScript.

So we have a file ftd::ftd.js, in this file we have window.ftd JavaScript object. This object contains function get_value(id, variable_name). SO get the value of the variable we have to call this function with id: main.

E.g:

Let’s we want to get the value of variable ftd#markdown-color.link.light. We can use below function to get this.

window.ftd.get_value("main", "ftd#markdown-color.link.light")