# Generate pages from frontend and redirect user

**URL:** <https://forum.getkirby.com/t/generate-pages-from-frontend-and-redirect-user/6122>\
**Category:** Questions\
**Tags:** v2\
**Created:** [December 22, 2016, 8:10pm UTC](https://forum.getkirby.com/t/generate-pages-from-frontend-and-redirect-user/6122 "2016-12-22T20:10:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tart2000](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/tart2000/32/518_2.png) [@tart2000](https://forum.getkirby.com/u/tart2000)\
**Post date:** [December 22, 2016, 8:10pm UTC](https://forum.getkirby.com/t/generate-pages-from-frontend-and-redirect-user/6122/1 "2016-12-22T20:10:28Z")

</div>

Dear fellow Kirby lovers,  
Would there be a simple way in Kirby to:

1. click a button on the frontend
2. generate a page with a hash ID (ex. [mysite.com/h37xvba8](http://mysite.com/h37xvba8))
3. send the user directly to this page

Any help welcome!  
Thanks

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 22, 2016, 10:05pm UTC](https://forum.getkirby.com/t/generate-pages-from-frontend-and-redirect-user/6122/2 "2016-12-22T22:05:14Z")

</div>

Should be possible if you adapt this recipe: [https://getkirby.com/docs/cookbook/creating-pages-from-frontend](https://getkirby.com/docs/cookbook/creating-pages-from-frontend)

Remove the rest of the form, so all you end up with is a submit button, then generate a hash as page UID. After page creation, redirect to the page (in the Panel, I guess?)

---

<div class="post-metadata">

**Author:** ![lord-executor](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lord-executor/32/2229_2.png) [@lord-executor](https://forum.getkirby.com/u/lord-executor)\
**Post date:** [December 23, 2016, 7:00am UTC](https://forum.getkirby.com/t/generate-pages-from-frontend-and-redirect-user/6122/3 "2016-12-23T07:00:27Z")

</div>

Obviously depends on your definition of simple ;), but I’d also say yes, that is possible.

I have done similar things in the past, using the [Uniform](https://github.com/mzur/kirby-uniform/) plugin to create pages from user-submitted data.

From @texnixe’s Link, the IMO most important bit is in the event.php controller the line

```
$newRegistration = $page->find('registrations')
    ->children()
    ->create(str::slug($data['lastname'] . '-' . $data['firstname'] . '-' . time()), 'register', $data);

```

Where $data contains the field values for your new page.

---

<div class="post-metadata">

**Author:** ![tart2000](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/tart2000/32/518_2.png) [@tart2000](https://forum.getkirby.com/u/tart2000)\
**Post date:** [December 23, 2016, 2:45pm UTC](https://forum.getkirby.com/t/generate-pages-from-frontend-and-redirect-user/6122/4 "2016-12-23T14:45:00Z")

</div>

Thanks guys!  
I really want to give that a try.  
@texnixe the idea is to redirect to the page created in the front-end, where he’ll be able to use a three.js application… ([https://github.com/TechnoCultureClub/voxel-builder-V2](https://github.com/TechnoCultureClub/voxel-builder-V2) \> [http://cubecraft.technoculture.club](http://cubecraft.technoculture.club))  
I know it’s not a perfect solution but it might work 😉

---

<div class="post-metadata">

**Author:** ![tart2000](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/tart2000/32/518_2.png) [@tart2000](https://forum.getkirby.com/u/tart2000)\
**Post date:** [December 23, 2016, 2:49pm UTC](https://forum.getkirby.com/t/generate-pages-from-frontend-and-redirect-user/6122/5 "2016-12-23T14:49:41Z")

</div>

PS. The page creation recipe is very interesting!  
Thanks for pointing it out…

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 23, 2016, 2:51pm UTC](https://forum.getkirby.com/t/generate-pages-from-frontend-and-redirect-user/6122/6 "2016-12-23T14:51:21Z")

</div>

Do you want anyone to be able to create a page without authentication?

The redirect is no problem, by the way, all you need is to get the url of the page after creation.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 4:53pm UTC](https://forum.getkirby.com/t/generate-pages-from-frontend-and-redirect-user/6122/7 "2025-02-06T16:53:08Z")

</div>


