- Dynamic Routing
- Custom Routing
Type 1 - Dynamic Routing
Base theme provides dynamic routing based on page slug provided in the Experro admin panel. Let’s assume that we’re interested in creating an About Us page in our base theme. Login into the Experro Admin Panel and add a new web page withRecord Name and Page Slug values.

/about-us/ route in Base theme and it is handled dynamically by base theme and Experro Storefront.
You just need to hit that route with the respective domain name to view that page with page-slug. However, it’s important to note that the specific record associated with that route(page-slug) needs to be published in order for it to be accessible.
Type 2 - Custom Routing
With custom routing, you can attach the route to specific template in base theme. Let’s understand the custom routing with an example. Intemplates folder we have one file with name blog-list.tsx and we want to display the content of this file when user visit the /blog-list route.
We just need to register the template against route in route-list.tsx and Experro Storefront will handle the remaining.
The route-list.tsx is located at src/routes file.
route-list.tsx file, you should see an array with name Routes. This array is collection of custom routes defined as an object. Add an object for /blog-list route in this object using the following code:
Page component from experro-storefront is responsible for rendering the template for given custom route. TRoutinghe Page component accepts a component, templates, componentToLoad (template that we’re interested to render), and unique key props.