+1
Answered

Access block custom properties in UTL

Aidian 2 months ago • updated by Christine Masters (Director of Product Management) 2 months ago 2

Anyone know syntax for access a block's custom property in UTL?  Context would be an to use as parameter in an if statement.  It's one of the (many, many) undocumented parts of the language.  Thanks folks!

Answer

Answer

From within the block? Use this.block.custom.(custom property name), depending on the custom property type.


It's in the docs, but kind of hidden there. There is a dev-specific part of the documentation with it.


Also, there's a little question mark in the top-right corner that has some reference stuff.



Answer

From within the block? Use this.block.custom.(custom property name), depending on the custom property type.


It's in the docs, but kind of hidden there. There is a dev-specific part of the documentation with it.


Also, there's a little question mark in the top-right corner that has some reference stuff.