+1
Answered

Access block custom properties in UTL

Aidian 7 years ago updated by Christine Masters 7 years 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.