# How do I create a page path with and without slash and extra text?

**URL:** <https://community.weweb.io/t/how-do-i-create-a-page-path-with-and-without-slash-and-extra-text/12730>\
**Category:** How do I?\
**Created:** [September 23, 2024, 2:33pm UTC](https://community.weweb.io/t/how-do-i-create-a-page-path-with-and-without-slash-and-extra-text/12730 "2024-09-23T14:33:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![davhad](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/davhad/32/9664_2.png) [@davhad](https://community.weweb.io/u/davhad)\
**Post date:** [September 23, 2024, 2:33pm UTC](https://community.weweb.io/t/how-do-i-create-a-page-path-with-and-without-slash-and-extra-text/12730/1 "2024-09-23T14:33:18Z")

</div>

I have pages with the following path: [https://website.com/place/[id]](https://website.com/place/%5Bid%5D) which currently works ok.

I’d like to now extend those pages with subpages of the form:  
[https://website.com/place/[id]](https://website.com/place/%5Bid%5D) (already exists)  
[https://website.com/place/[id]/report](https://website.com/place/%5Bid%5D/report)  
[https://website.com/place/[id]/summary](https://website.com/place/%5Bid%5D/summary)  
[https://website.com/place/[id]/similar](https://website.com/place/%5Bid%5D/similar)

I’m trying to figure out if there’s a way to do this all within one weweb page as opposed to recreating each separately. More specifically I’m trying to find a way to have both the path with id and not subsequent slashes with the paths with a trailing slash…

Has anyone in the community tried this successfully?

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [September 23, 2024, 8:34pm UTC](https://community.weweb.io/t/how-do-i-create-a-page-path-with-and-without-slash-and-extra-text/12730/2 "2024-09-23T20:34:01Z")

</div>

> [@davhad](#):
>
> if there’s a way to do this all within one weweb page as opposed to recreating each separately.

Nope. The best you can do is to use the `?query=parameters`

---

<div class="post-metadata">

**Author:** ![thomlov](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/thomlov/32/8591_2.png) [@thomlov](https://community.weweb.io/u/thomlov)\
**Post date:** [September 23, 2024, 9:17pm UTC](https://community.weweb.io/t/how-do-i-create-a-page-path-with-and-without-slash-and-extra-text/12730/3 "2024-09-23T21:17:04Z")

</div>

Maybe you can use two path variables, and make sections in your page for each subpage. Then use conditional rendering to show only the correct subpage.

![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/3/3384be3cf3c1bdfc403b7564b2c427d5c366c834.png)

---

<div class="post-metadata">

**Author:** ![davhad](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/davhad/32/9664_2.png) [@davhad](https://community.weweb.io/u/davhad)\
**Post date:** [September 23, 2024, 9:43pm UTC](https://community.weweb.io/t/how-do-i-create-a-page-path-with-and-without-slash-and-extra-text/12730/4 "2024-09-23T21:43:49Z")

</div>

Tack så mycket for the idea. That was my first go to option too (both the two params and the conditionals).

The reason why I posted it here is that once param2 is not present (such as in path 1 with just [yourdomainxyz.com/produkt/123](http://yourdomainxyz.com/produkt/123)) an error arises.

So I’m seeking a way where the same page can both handle  
[[yourdomainxyz.com/produkt/123](http://yourdomainxyz.com/produkt/123)]  
and  
[[yourdomainxyz.com/produkt/123/subpage](http://yourdomainxyz.com/produkt/123/subpage)]

---

<div class="post-metadata">

**Author:** ![davhad](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/davhad/32/9664_2.png) [@davhad](https://community.weweb.io/u/davhad)\
**Post date:** [September 23, 2024, 9:44pm UTC](https://community.weweb.io/t/how-do-i-create-a-page-path-with-and-without-slash-and-extra-text/12730/5 "2024-09-23T21:44:55Z")

</div>

@Broberto can’t for so many reasons chief of which is that it looks ugly 🤣

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [September 24, 2024, 5:30am UTC](https://community.weweb.io/t/how-do-i-create-a-page-path-with-and-without-slash-and-extra-text/12730/6 "2024-09-24T05:30:53Z")

</div>

I think this has been said to not work

---

<div class="post-metadata">

**Author:** ![thomlov](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/thomlov/32/8591_2.png) [@thomlov](https://community.weweb.io/u/thomlov)\
**Post date:** [September 24, 2024, 6:52am UTC](https://community.weweb.io/t/how-do-i-create-a-page-path-with-and-without-slash-and-extra-text/12730/7 "2024-09-24T06:52:15Z")

</div>

Not with the same page, but you can create an empty page to handle [yourdomainxyz.com/produkt/123](http://yourdomainxyz.com/produkt/123).

In the empty page you create a on page load workflow where you send the user to [http://yourdomainxyz.com/produkt/123/default](http://yourdomainxyz.com/produkt/123/default) for example.

This will then just redirect the user to the default page

Maybe not what you are looking for but I think that’s the only solution I can think of unless weweb adds a possibility for having an empty url variable.
