Parametric routes allow you to encapsulate multiple pages under the same URL.
Parametric pages allow you to encapsulate multiple pages under the same URL.
/{country}/landingPage // landing page that takes the country into account
/{lang}/products // product listing page for multiple languages
/{categories}/{blogPost} // custom blog posts separated by category
Parametric pages work like this:
{country} or {lang} slug, or to any slug you define, such as {categories}.{categories}, the connected component must define a "Route Slug" in the component builder.In the admin panel, create a parametric route: /{country}/landingPage
Then connect the {country} slug to the Country schema.
The βNo default slug field configured for this componentβ warning means the system does not yet know which schema field should be used as the URL slug. This will be resolved in the next step.
Create a Country schema in the CMS.
Example structure:
{
"code": "us",
"name": "United States",
"language": "English"
}
Assume you currently have three documents in this schema.
Go to Country schema β Edit Schema.
Bind the code field as the Route Slug Field.
This means valid routes will be: /us/landingPage
Invalid routes:
/English/landingPage/United States/landingPageSee Setting up Parametric Routing with a renderer to render parametric pages.