Thisguideshowsyouhowtocreatevariationsofthesamepagewith[routeparams](/docs/app/api-reference/file-conventions/dynamic-routes)and[CacheComponents](/docs/app/getting-started/cache-components),prerenderasubsetofthemat[buildtime](/docs/app/glossary#build-time), and add conditional dynamic content without breaking prerendering.
## Example
Asanexample,we'll build a product detail page that displays product information based on a URL slug.
Visiting`/products/shorts`passes`"shorts"`astheslug.Thepagefetchesandrendersthatproduct's data. Visiting `/products/shoes` renders a different product using the same components.
Even though the data is cached, the page still depends on `params`, which can only be resolved when a request arrives. If we run [`next build`](/docs/app/api-reference/cli/next#next-build-options), the route is marked as dynamic:
```bash filename="Terminal"
Route (app)
├ ƒ /products/[slug]
└ ○ /_not-found
ƒ (Dynamic) server-rendered on demand
```
The framework doesn'tknowwhichslugsexistaheadoftime.Everyrequesttriggersafreshrender.Toprerenderthesepages,weneedtotellNext.jswhichparamvaluestoexpect.
### Step 2: Prerender variations with generateStaticParams