Skip to content

How to automatically add newly created content definitions to Audit Trail -> Allowed content types? #16438

Answered by Piedone
hieucd04 asked this question in Q&A
Discussion options

You must be logged in to vote

You'll need to do some coding for this, if the goal is to have all content types selected there, past and future, and you don't know their names in advance.

Some pointers (look at the source code of Audit Trail by cloning the OC repo): these are stored in ContentAuditTrailSettings. You update them from the UI using ContentAuditTrailSettingsDisplayDriver. You could implement an IContentDefinitionEventHandler and in ContentTypeCreated update ContentAuditTrailSettings.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hieucd04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants