adi_variables – Manage TXP variables
This plugin provides:
- a new Variables tab under Content to manage your variables
- a new form, adi_variables, to store the variables
A new form, called adi_variables, will be installed when you visit the Variables tab for the first time.
Delete/edit the example variables and/or add your own.
To bring them into operation put this line of code:
<txp:output_form form="adi_variables" />
at the top of all your web pages.
All users will see the Variables tab under Content. This provides:
- a list of variables & their current values
- the ability to add & delete variables
- options to make variables Admin or Public
- drag & drop reordering*
- an admin function to take a backup copy of the adi_variables form in adi_variables_copy
*Note that the variables will still be in two groups – Admin or Public.
Admin & Public
Because TXP variables have been implemented as a tag and hence used in forms/pages etc, the distinction between ‘Admin’ and ‘Public’ kicks in a long way down the food chain. Basically, anybody apart from Staff Writer & Freelancer has access to Forms – so it’s only these two user privs that can sensibly be restricted.
Admin users can add, delete, rename or update any of the variables.
Public users (i.e. Staff Writer & Freelancer) have visibility of all variables but can only update values of the ‘Public’ ones.
By making variables ‘Public’, you’re giving Staff Writer & Freelancer users the ability to modify them. Normally they wouldn’t be able to edit the forms containing the
<txp:variable /> entries. They still, however, can’t delete, rename or add variables.
It is possible, however, to restrict access to the Variables tab by changing the privilege settings in plugin options.
To install the Textpack, go to the plugin’s Options tab and click on “Install textpack”. This will copy & install it from a remote server. The number of language strings installed for your language will be displayed.
If the Textpack installation fails (possibly due to an error accessing the remote site), the alternative is to click the Textpack also available online link. This will take you to a website where the Textpack can be manually copied & pasted into the TXP Admin – Language tab.
Additions and corrections to the Textpack are welcome – please use the Textpack feedback form.