Modifying generators

This is just a basic explanation, you will need php knowledge to achieve, what you would like to do.

Here you can see, where to find the files of the generators, but this is the most important file from them, and probably you want to modify this one:





You should go to the lower part of the file, to the getData function, because that is where the variables are getting the values. Check at it's end, what is the variable it returns, usually it's $data or $result. This is a multidimensional array, which looks for example like this with getting it's value:

$data[$i]['description'] = $result->text;

The $i is the index of the value in the array, which is if you are using 1 variables / 1 slide, the number of the slide, where it will be. The 'description' is the name of the variable you will use in the backend, and on the right there is the value you will get with this variable. This is either the result of a database query or the result of an api, so you should probably need to modify that database query, check your database, find the extra table column you need or check the api what variables does it offer, var_dump this $result to see, what it contains (you will need to click on Refresh Cache at your slider to see it), and give your new value to your new variable:

$data[$i]['newvar'] = $result->something_new;

and you will be able to use the {|newvar-1|} variable in your backend Generator -> Edit Layout. You will see it in the Generator -> Record Viewer, but if you want to, you can also add it to this part in the same file at the top:

 $this->_variables = array(...);

Like this, without NextendText, which is only used for translation:

 $this->_variables = array(
    'newvar' => 'My new variable',

Click on Refresh Cache at your slider, and you will see it in your backend layout editor too at the list of variables: