Function argVal fcf.Arg argVal(mixed a_value, object a_options = undefined) Returns an object of the template argument of the value type. The template collector tokenized and assembles the nested arguments on the passed value. Source file fcf:fcf.js Namespace fcf Arguments: mixed a_value - Stores the value of the argument over which the tekonization is performed. It is also allowed to declare nested template arguments such as fcf. argTmpl() object a_options - An object containing the parameters of the template argument. List of template arguments:
  • array[string] dependencies - an array of template argument names on which the assembly of the declared argument depends. Tokenized dependencies are added automatically. Perhaps this parameter will be removed as unnecessary if the API is not expanded and its functionality is needed
  • array[string] hardDependencies - an array of template argument names on which the assembly of the declared argument depends. But unlike dependencies, overloading the argument does not remove this dependency and it is relevant when using hooks
  • int level - Performs the restriction of argument disclosure (performing tokenization) in nested arguments. Processing of an argument, its disclosure occurs if its value is equal to or less than 1. This parameter is reduced by one for each rendering operation.


    //~TEMPLATE @{{ render.template( "@controls:table", { value: [{value: 1}, {value: 2},{value: 3}], columns: fcf.argVal([ { alias: "value", type: "string", value: fcf.argVal("value: @{{args.___value}}@", {level: 2}) ___value: fcf.argRecordRef("value"), } ]) }); }}@

    In the example above, the columns argument for the table is the tokenizing element. The value of the value column is calculated when rendering a table cell, and not during processing of table arguments, this is just achieved by the level parameter.

Return value: fcf.Arg Examples Example 1 //~ARGUMENTS { title: "some title", description: "some description", result_value: fcf.argVal("@{{args.title}}@ - @{{args.description}}@") } //~TEMPLATE @{{args.result_value}}@ Result: some title - some description