Modifieng a attribute value when composer save

Permalink
Hi

Does anyone know how to change a attribute value when composer save and/or publish.
The attribute type that have to change is type is topic.

I have tried to use the guide creating-a-custom-page-type-validator athttps://documentation.concrete5.org/developers/working-with-pages/cr... Is this the right direction

Concrete5 8.3.2

Greetings from Denmark

dafnie
 
janwidmer replied on at Permalink Reply
janwidmer
Hey @dafnie,

I just stumbled over your question while trying to figure out how to achieve exact the same thing.

After a little bit of research, I found the following resources:
Hook into page events:https://documentation.concrete5.org/developers/application-events/ho...
From a Package:https://documentation.concrete5.org/developers/packages/modifying-st... /https://documentation.concrete5.org/developers/packages/adding-custo...
Modifing a page on Save:https://documentation.concrete5.org/developers/application-events/ex... (Full example here in web archivehttps://web.archive.org/web/20160412173334/http://andrewembler.com/2...

From here you should be able to modify probably any page properties before saving them..