variable.getName()
variable.getName()
Retrieves the name of the variable.
Syntax
variable.getName(): Promise<string>;
Returns
Promise<string
>
A Promise that resolves to a string
with the variable name
Example
// Get Collection
const collection = await webflow.getDefaultVariableCollection()
// Get All Variables
const variables = await collection.getAllVariables()
// Get Value of first Variable
const variable = variables[0]
const value = await variable.getName()
Designer Ability
Checks for Authorization only
Designer Ability | Locale | Branch | Workflow | Sitemode |
---|---|---|---|---|
canReadVariables | Any | Any | Any | Any |