# URL-appendix and dates

**URL:** <https://forum.getkirby.com/t/url-appendix-and-dates/9578>\
**Category:** Questions\
**Tags:** v2\
**Created:** [January 31, 2018, 1:34pm UTC](https://forum.getkirby.com/t/url-appendix-and-dates/9578 "2018-01-31T13:34:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meuss](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/meuss/32/1488_2.png) [@Meuss](https://forum.getkirby.com/u/Meuss)\
**Post date:** [January 31, 2018, 1:34pm UTC](https://forum.getkirby.com/t/url-appendix-and-dates/9578/1 "2018-01-31T13:34:25Z")

</div>

Hello!

Just one small question that I have no idea how to start solving: When adding a new page in the panel and using a date as the page title, the default URL-appendix does not take the whole date (takes month+year but leaves out the day).

For example: If I add a page with title: **31.01.2018** , it creates the URL **/parentpage/01-2018**. How can I make it automatically generate **/parentpage/31-01-2018**?

---

<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:** [January 31, 2018, 1:36pm UTC](https://forum.getkirby.com/t/url-appendix-and-dates/9578/2 "2018-01-31T13:36:58Z")

</div>

This is not possible, because with numbers like this Kirby treats the first part as the sorting number. When creating the URI, the dot is replaced with a dash.

A date like 20180131 would work, though. Or, you could manually change the UID when creating the page. Maybe a hook would work as well.

---

<div class="post-metadata">

**Author:** ![Meuss](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/meuss/32/1488_2.png) [@Meuss](https://forum.getkirby.com/u/Meuss)\
**Post date:** [January 31, 2018, 1:39pm UTC](https://forum.getkirby.com/t/url-appendix-and-dates/9578/3 "2018-01-31T13:39:19Z")

</div>

Oh ok I understand what it’s doing then. Ok no worries, I’ll find a workaround, 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:** [January 31, 2018, 1:40pm UTC](https://forum.getkirby.com/t/url-appendix-and-dates/9578/4 "2018-01-31T13:40:52Z")

</div>

If you really want a URL with those dashes, you could use a page slug without dashes and use a route that finds the correct page.

---

<div class="post-metadata">

**Author:** ![Meuss](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/meuss/32/1488_2.png) [@Meuss](https://forum.getkirby.com/u/Meuss)\
**Post date:** [January 31, 2018, 2:07pm UTC](https://forum.getkirby.com/t/url-appendix-and-dates/9578/5 "2018-01-31T14:07:23Z")

</div>

Well actually the URL structure is not that important. The thing is that I’m preparing this for a client, that often creates new pages (using dates as titles), and creates errors when adding a new page (in the same month) when one already exists:  
20.02.2018 -\> creates /02-2018  
26.02.2018 -\> error, the page UID exists

I just need to find the simplest solution so that the admin doesn’t see this error.

---

<div class="post-metadata">

**Author:** ![Meuss](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/meuss/32/1488_2.png) [@Meuss](https://forum.getkirby.com/u/Meuss)\
**Post date:** [January 31, 2018, 2:09pm UTC](https://forum.getkirby.com/t/url-appendix-and-dates/9578/6 "2018-01-31T14:09:57Z")

</div>

Is there a simple way to generate something like **/02-2018-2** instead of the running into this error?

---

<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:** [January 31, 2018, 3:02pm UTC](https://forum.getkirby.com/t/url-appendix-and-dates/9578/7 "2018-01-31T15:02:47Z")

</div>

What you could try is use a panel.page.create hook that recreates the UID from the title (without the dashes) and then makes the page invisible again.

---

<div class="post-metadata">

**Author:** ![Meuss](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/meuss/32/1488_2.png) [@Meuss](https://forum.getkirby.com/u/Meuss)\
**Post date:** [January 31, 2018, 3:06pm UTC](https://forum.getkirby.com/t/url-appendix-and-dates/9578/8 "2018-01-31T15:06:33Z")

</div>

Ok, I will have a look into this. thanks again!

---

<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:30pm UTC](https://forum.getkirby.com/t/url-appendix-and-dates/9578/9 "2025-02-06T17:30:09Z")

</div>

Archived on February 6, 2025, 5:30pm UTC


