dd / evolutioncms-plugins-managermanager-mm_renamefield
A widget for ManagerManager plugin that allows one of the default document fields or template variables to be renamed within the manager.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/dd/evolutioncms-plugins-managermanager-mm_renamefield
Requires
- php: >=5.4.0
- dd/evolutioncms-plugins-managermanager: >=0.7.0
This package is auto-updated.
Last update: 2025-10-06 08:38:35 UTC
README
A widget for ManagerManager plugin that allows one of the default document fields or template variables to be renamed within the manager.
Requires
- PHP >= 5.4
- (MODX)EvolutionCMS >= 1.1
- (MODX)EvolutionCMS.plugins.ManagerManager >= 0.7
Installation
To install you must unzip the archive to /assets/plungins/managermanager/widgets/mm_renamefield/.
You may also read this documentation:
Parameters description
-
$params- Desctription: Parameters, the pass-by-name style is used.
- Valid values:
stdClassarrayAssociative
- Required
-
$params->fields- Desctription: The name(s) of the document fields (or TVs) for which the widget is applied to.
- Valid values:
stringCommaSeparatedarray
- Required
-
$params->fields[$i]- Desctription: The name of the document field or TV.
- Valid values:
string - Required
-
$params->newLabel- Desctription: The new text for the field label.
You can also use HTML tags. - Valid values:
string - Required
- Desctription: The new text for the field label.
-
$params->newHelp- Desctription: New text for the help icon with this field or for comment with TV.
The same restriction apply as when usingmm_changeFieldHelpdirectly. - Valid values:
string - Default value: — (don't change help text)
- Desctription: New text for the help icon with this field or for comment with TV.
-
$params->roles- Desctription: The CMS user roles that the widget is applied to.
- Valid values:
arraystringCommaSeparated''— when this parameter is empty then widget is applied to the all roles
- Default value:
''
-
$params->roles[$i]- Desctription: CMS user role ID.
- Valid values:
integer - Required
-
$params->templates- Desctription: Document templates IDs for which the widget is applied to.
- Valid values:
arraystringCommaSeparated''— empty value means the widget is applying to all templates
- Default value:
''
-
$params->templates[$i]- Desctription: Template ID.
- Valid values:
integer - Required
CMS events
OnDocFormRender
Examples
Rename the longtitle field to Page heading for all users
mm_renameField([ 'fields' => 'longtitle', 'newLabel' => 'Page heading' ]);
Rename the pagetitle field to Case study name for documents using template ID 3
mm_renameField([ 'fields' => 'pagetitle', 'newLabel' => 'Case study name', 'templates' => '3' ]);