# Generate children of children URLS

**URL:** https://forum.getkirby.com/t/generate-children-of-children-urls/10059
**Category:** Questions
**Tags:** v2
**Created:** [March 22, 2018, 1:57pm UTC](https://forum.getkirby.com/t/generate-children-of-children-urls/10059 "2018-03-22T13:57:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![chrisgwynne](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/chrisgwynne/32/5194_2.png) [@chrisgwynne](https://forum.getkirby.com/u/chrisgwynne)
#### Post date: [March 22, 2018, 1:57pm UTC](https://forum.getkirby.com/t/generate-children-of-children-urls/10059/1 "2018-03-22T13:57:51Z")

</div>

> $p = page(‘sale’)-\>children()-\>create(str::slug(rand ( 1 , 50000 ) . ‘-’ . $data[‘title’]) , ‘submit’, $data);

I have this that creates /sale/{random}-{title}

How would I be able to change this so that it creates /sale/{random}/{title}

I’ve just noticed my other problem… using a random number pre-appended to the title alters how kirby processes the URL. Any ideas?

---

<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: [March 22, 2018, 2:02pm UTC](https://forum.getkirby.com/t/generate-children-of-children-urls/10059/2 "2018-03-22T14:02:09Z")

</div>

You have already asked that here: [Unique URLs in kirby](https://forum.getkirby.com/t/unique-urls-in-kirby/10029)

---

<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: [March 22, 2018, 2:06pm UTC](https://forum.getkirby.com/t/generate-children-of-children-urls/10059/3 "2018-03-22T14:06:27Z")

</div>



---

<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, 5:20pm UTC](https://forum.getkirby.com/t/generate-children-of-children-urls/10059/4 "2025-02-06T17:20:52Z")

</div>


