Modx - Add custom field to mod_site_content

Is it possible to add a custom field to modx_site_content?

What I’m trying to accomplish, is to add a field t_id. I’ve already added this in the database.

However, when I save it using: $object->save(); nothing is saved for that field, it just comes up as Null.

Welcome to the forum :slight_smile:

That is technically possible, but requires you to load additional xPDO maps in order for the xPDO APIs to be able of working with your extra field. I don’t think there’s documentation about that, but I know minishop2 does that sort of thing quite extensively.

Generally though, I’m not quite sure if adding fields to the core models is the best way to go. Could you elaborate on your use case/what you’re trying to achieve? Maybe we can suggest an alternative for you.