# Hook page.create:before, how to edit user input?

**URL:** <https://forum.getkirby.com/t/hook-page-create-before-how-to-edit-user-input/12656>\
**Category:** Questions\
**Tags:** v3\
**Created:** [February 3, 2019, 4:15pm UTC](https://forum.getkirby.com/t/hook-page-create-before-how-to-edit-user-input/12656 "2019-02-03T16:15:10Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![lukaskleinschmidt](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lukaskleinschmidt/32/13388_2.png) [@lukaskleinschmidt](https://forum.getkirby.com/u/lukaskleinschmidt)\
**Post date:** [August 12, 2019, 12:26pm UTC](https://forum.getkirby.com/t/hook-page-create-before-how-to-edit-user-input/12656/12 "2019-08-12T12:26:01Z")

</div>

Not tested but it should probably look something like this.

```php
class ParentPage extends Page
{
    /**
     * Creates and stores a new page
     *
     * @param array $props
     * @return Page
     */
    public static function create(array $props): Page
    {
        $props['slug'] = $props['content']['title'] . '-' . date('Y');
        
        return parent::create($props);
    }
}

```

**Note:**

Since **Kirby 3.4** you need to overwrite the create method on the actual page model that is going to be created. Not the parent model!

---

_[View the full topic](https://forum.getkirby.com/t/hook-page-create-before-how-to-edit-user-input/12656)._
