I'm working on a multilingual website where I have one structure called Products. Currently, this structure's URI format is configured like this:
{parent.uri ?? section.handle}/{slug}
Which returns URLs like this:
/products/topLevelProduct1
/products/topLevelProduct1/nestedProduct1
/products/topLevelProduct1/nestedProduct2
/products/topLevelProduct2
/products/topLevelProduct2/nestedProduct1
/products/topLevelProduct2/nestedProduct2
etc
The main thing I'm struggling with now is: how do I translate the top-level part of the URI (i.e. /products
)? I guess I could use the built-in t()
function on section.handle
(is that even a good idea?) but that would still be overwritten by parent.uri
.