A widget for ManagerManager plugin that allows sections to be minimizable on the document edit page.
- PHP >= 5.4
- (MODX)EvolutionCMS.plugins.ManagerManager >= 0.7
To install you must unzip the archive to /assets/plungins/managermanager/widgets/mm_minimizablesections/
.
You may also read this documentation:
-
$params
- Desctription: The object of parameters.
- Valid values:
stdClass
arrayAssociative
- Default value: —
-
$params->sections
- Desctription: The ID(s) of the sections that the widget is applied to.
- Valid values:
''
— all sectionsstringCommaSeparated
array
- Default value:
''
-
$params->minimizedByDefault
- Desctription: The ID(s) of the sections that should be minimized by default.
- Valid values:
stringCommaSeparated
array
- Default value: —
-
$params->roles
- Desctription: The CMS user roles that the widget is applied to.
- Valid values:
array
stringCommaSeparated
''
— 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:
array
stringCommaSeparated
''
— empty value means the widget is applying to all templates
- Default value:
''
-
$params->templates[$i]
- Desctription: Template ID.
- Valid values:
integer
- Required
OnDocFormPrerender
OnDocFormRender
mm_minimizableSections();
Apply to the content and Template Variables sections for users with role 1
editing the documents with the template ID equals 3
mm_minimizableSections([
'sections' => 'content,tvs',
'roles' => '1',
'templates' => '3',
]);
mm_minimizableSections([
'minimizedByDefault' => 'tvs,photos',
]);