I just have the strange problem that the slug cannot be changed with the page hook. Is there something wrong with this code? The strange thing is that everything is created correctly in the file system, but the pages always have a "Slug: " in the text file. This means that I can never call the pages. Even if I click on Preview in the panel, I can’t view the page. It is in a multilingual environment.
Sorry for the title. But what’s a better way to change the slug instead of a Hook? I use the AddFields Plugin that the User simply pick a date and the slug must be generated through that field.
Is the page model called when the page is created? To be honest, I didn’t really understand about the page model. I create a page model with the same name as the template and then how is it called?
In a page model you extend the Page class The model inherits all public and protected methods from this class (class inheritance) and you can add new methods or overwrite existing ones.
If you are not familiar with OOP, you can read more about it here: