Define Block Shortcode Form Parameters would inform CJT to carry up few steps based on the current process. Two process is being handled when using Block Shortcode with parameters based.

Insert Shortcode

  • Get user Inputs through internal Parameter Form
  • Validate Parameters value based on the Parameter Data Type
  • Generate Block Shortcode text.

Process Shortcode

  • Read Shortcode Parameters.
  • Validate Shortcode Parameters (This is important in case Shortcode text is typed manually)
  • Allow Code Block to access Shortcode parameters by using CJT Blocks Developer API (CBDA)

Defining Block Parameter is done by using param tag. There is no limitation of the number of parameters that can be defined for the Block.

  <group name="GROUP_NAME">

Data Fields

  • PARAMS_NAME: Parameter name used for read/write parameter value and will be the title of the input field.
  • DATA_TYPE: Data type used to validate and generate parameter Shortcode text.
  • DEFAULT_VALUE: To be used when Parameter is not being passed
  • GROUP_NAME: Associate to group.
  • INPUT_TYPE: Input field type to be used for receiving user inputs (Text, Dropdown List, Checkbox, etc…). For more info about the supported input types checkout Input Types article.
  • PARAM_DESCRIPTION: Parameter input field help text.

Content Parameter

Each block might content one Content Parameter. Content Parameter is to use the TEXT between Shortcode open and close tags. Its great when generating TEXT inside the Shortcode is required like getting a list of HTML Images of Links. It should be used with RAW data type.