Custom Properties

Custom Properties in Nyla enable you to create advanced layouts and interactions on your site by combining link actions with conditional visibility.

Custom properties are global properties that maintain a single state. Changing the value in one place or page will change it everywhere. This means that you can have multiple link actions that can update the same custom property. 


Custom properties are always set to FALSE as default until they are changed with a link action. 

 

See a video tutorial on custom properties here: 

 

Creating a Custom Property: In order to create a custom property, you need to create a link action that defines the custom property. When you set the link action, a field will appear for you to set the name of the custom property there. 

Important: custom properties need to be a single string of text, you cannot use underscores, spaces or special characters. 

Once you have created your customer property, you will then be able to use this on your site as a normal property. See Property syntax here.

Toggle Custom Property: Toggling a custom property allows you to set a custom property, then set that value to true or false. 


Link actions: 

  • ToggleCustomProperty("Property Name"): changes the state of the custom property from either true or false to the other value. 
  • SetCustomPropertyAsTrue("Property Name"): sets the custom property as true 
  • SetCustomPropertyAsFalse("Property Name"): sets the custom property as false

Set Custom Property: Set custom property allows you to set a specific value for a property, or to set the value to false. This enables you to change the value of a specific property based on users clicking on different link actions across the site. 


Link actions:

  • SET_CUSTOM_PROPERTY_AS_VALUE("Property Name")
  • SET_CUSTOM_PROPERTY_AS_BLANK("Property Name")

Note that you can set properties as the value of custom properties, for example on a grid layout, you could set a grid index as the custom value if you want to use the feature dynamically. 

See Properties here