Static collection page - modify URL?

I have static collection page and its URL is generated from slug.
Now it is domain.com/slug-from-collection

I need it to be:
domain.com/TITLE/slug-from-collection

how to add “TITLE/” for URL because my collection is part of section with TITLE, user navigates ther by:
domain.com/TITLE/
then
domain.com/TITLE/item

looks like there is no way to update it?

1 Like

Hi @Anna.fae :wave:

You’ll need to update this in the “slug” field of your collection.

2 Likes

@Joyce you are on fire in this forum. I swear over the last 3 days nearly every question I search you’ve dropped an answer just hours before I look. So first, THANK YOU for your hard work in keeping us informed!

Naturally, I just had this exact question that @Anna.fae had with a static collection of mine. Would you mind clarifying further what you mean by the slug field in the Collection? At first, I thought there was an actual Slug setting when editing the collection, but there is none. I’m guessing what you mean is that we just need to build that folder in to the fields value?

So for example, let’s say I want my collection to have a /tutorials/ folder in the URL. Instead of this value returning from Xano:

how-to-create-a-slug-123

I should have Xano instead return this value:

tutorials/how-to-create-a-slug-123

Is that what you mean by your answer?

2 Likes

I did it like that, added “concat” filter and “title” in xano for my slug field and it works on weweb like “/title/slug” text with correct navigation

2 Likes

Haha thanks for the kind words :slightly_smiling_face:

And yes, that is exactly what I meant! Thanks for taking the time to clarify :slightly_smiling_face:

I’m using Hashnode in Headless mode to manage the blog.

It doesn’t allow the slug to add /pages/

I’m also managing session states where the domain is /gb/ or /us/ for different regions. Meaning that I need more flexibility with the URL than only serving one country on a domain.

Why are static collections so limited to the URL structure‽ Nevertheless, I’m thinking to setup some middleware to handle Hasnhnode as there’s a 50 article limit on the API (oh the joys). Then add specific GrapghQL queries for country regions.

I’m already forced away from using dynamic collections due to it’s missing SEO scope.

It just feels like a lot of workarounds to get a basic blog working :frowning: How are other people managing this situation?