Is there a way to automatically relate a category to a page based on it's node path?

Silke Jänichen asked on July 19, 2021 11:16

Hi, I have a page type 'article' and I wonder if it is possible to automatically relate a category depending on the node path of the article? Something like a default value for "Multiple categories selector" form control? Thanks in advance.

Correct Answer

Sean Wright answered on July 19, 2021 17:31

You can use Global Events to hook into the pre/post Page creation.

This would allow you to programmatically look at the location of a Page in the tree and then assign categories to it.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Silke Jänichen answered on July 19, 2021 17:50

Thanks Sean, I will try global events tomorrow.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.