I’m trying to use NocoBase to create pages that show one specific item from the database.
Right now, I can only do something like this:
/app/building?building=123
But I want a cleaner, easier-to-read address like:
/app/building/123
And for more complex pages:
/app/building/123/level/456
That means: instead of using ?building=123
, I want to use nice-looking URL paths that show what I’m looking at.
Right now, NocoBase doesn’t seem to support this. Is there a way to make it work?
Technical Details
The Problem
I’m trying to build record-specific pages in NocoBase with friendly URLs that reflect the structure of my data.
At the moment, the only way I’ve found to do this is to:
- Create a generic page
- Add a “Details” block
- Use a query string (
?building=123
) from the URL
- Set the data scope manually using that param
Example current page:
/app/building?building=123
But this is less than ideal.
What I’m Trying to Achieve
I want to follow best practice for user-facing routing in web apps:
- Use path segments instead of query parameters
- Reflect the hierarchy and relationships of the data
- End up with something like:
/app/building/123
/app/building/123/level/456
This makes the URLs:
- Cleaner
- Easier to read and understand
- Easier to link to and bookmark
- More consistent with modern frontend app design
Terminology Breakdown
Term |
Meaning |
Query strings |
A way to pass parameters like ?building=123 |
Path parameters |
Parameters built into the URL path like /building/123 |
Friendly URLs |
Human-readable, logical, and clean URL structures |
Hierarchical routing |
Routing that follows data structure relationships (building → level) |
RESTful routing |
Usually used for APIs — same concept, but for GET /resource/:id etc |
Note: While this kind of routing is sometimes called “RESTful-style,” that term is more accurate when you’re talking about API design. For front-end apps, it’s more correct to say:
- Friendly URLs
- Semantic URLs
- Hierarchical or nested routing