Hello,
so far modx has been a real joy to start out with compared to previous experiences in drupal and typo3.
For the relaunch of a university department site the backend editors need to be able to manage structured entities (staff, lectures, students etc.) in addition to the unstructured website content.
I dont want to ask you to do my work for me here, but before starting the implementation I wondered if the approach I consider here is maybe on the wrong track and modx does actually offer a simpler way to do this. So if you allow let me ask if the following complies to the "best practices" in modx so to say:
1)
n-m relations between entities matching page resources
Staff members and courses both have an individual "detail page" on the site and can be related in an
isResponsibleFor n-m relation.
Therefore I had planned to create a page resource for each staff member and course assigning both types a custom template of type
templateStaff or
templateCourse with both templates containing a certain amount of custom template variables (e.g. email address for staff members, room number for courses). The
isResponsibleFor relations would be set via a custom implemented TV input variable offering e.g. for a staff member’s "responsibleFor" TV all courses in a multi-selectbox (populated by the custom TV input variable querying the modx environment for all page resources using the
templateCourse template).
1b)
Mandatory TV’s
Is it possible to markup certain TV’s as "required"? In the above example e.g. a staff members email address? If there is no out-of-the-box way for this:
Would implementing a custom
validateEmployeeDetails plugin which is attached to e.g. the
OnBeforeDocFormSave system event and checks whether certain TV’s have been filled in be the correct way to go?
2)
n-m relations between entities not page resources
A third entity type students would not require a "detail" page. For this case I had planned to create
Custom Manager Pages to enable a
CRUD-style management area in the modx manager backend using a
Custom Database Table in your 3rd Party Components. Relations to courses/staff could be added same as above via custom input TV’s on the course/staff TV tabs.
Mostly I am worried if the implementation of custom manager pages along with the required ajax fields and xPDO schemata to manage the
student entities might be overkill in some way.
Thank you a bunch for your feedback here - it would be most appreciated

Hinnerk