Stacks API

Come build with us.
Stacks API v10 for Stacks 3.5


  <   Templates Variable Reference


This content is open source. You can edit it and submit a pull request on GitHub.
This page is generated from this file.


© . YourHead Software all rights reserved.

Property Value

%id=propertyID%

Available: Stacks API v2

Usage

%id=<property_id>%

or for control arrays

%id=<property_id>[<index>]%

Description

This template returns the value of a property. Properties and their corresponding controls are defined in the Info.plist file. When a user changes the properties by adjusting the controls, this value will change in real time.

Example 1: use the value of an slider.

template:

The slider value is: %id=slider_id%

exported HTML with the slider set to 10:

The slider value is: 10

Example 2: use two number fields in a control array.

template:

Image size to: %id=number_id[0]% x %id=number_id[1]%

exported HTML with the values 800 and 600 in the number fields:

Image size to: 800 x 600

Example 3: use radio buttons to change text alignment

template:

.myTextClass {
    text-alignment:
        %[if %id=radioButton[0]% ]%  left;    %[endif]%
        %[if %id=radioButton[1]% ]%  center;  %[endif]%
        %[if %id=radioButton[2]% ]%  right;   %[endif]%
}

exported CSS with the middle button pushed:

.myTextClass {
    text-alignment:
          center;
}
© . YourHead Software all rights reserved.