Help - K13 routing

Ryna Seio asked on December 13, 2023 16:08

So, we're upgrading K12 to K13 Xperience. One of the selling points and reasons to upgrade was content tree routing - no magic, everything is routed as it is

EXCEPT. yeeeeeeeah, we want these pagetypes to have custom routing.

So, for example, i have several pages:

/tools/woodworking/manual/saw
/tools/woodworking/electric/electric_saw
/tools/metalworking/manual/tool_1
/tools/woodworking/manual/tool_2

But customer wants ALL the tools to be accessed like this

/products/saw
/products/electric_saw
/products/tool_1
/products/tool_2

I'm absolutely lost here. On K12, it was done using URL Pattern property, but here we're using content tree routing, where that pagetype property is ignored

Will I have to move whole site to custom routing? https://tutuappx.com/ Vidmate thanks

Recent Answers


Brenden Kehren answered on December 13, 2023 17:36

What we do for this is create a custom page type called "folder" and don't apply any of the URL features to it. This will allow you to have your "Product" page, with nested folders tools/woodworking/manual, then under the saws folder you place your "saw" page with the URL. This will generate the /products/saw URL for you.

So the following:

/products = custom page type or a generic page builder page
/products/tools = folder with no URL attributes, cannot navigate to this page /products/tools/woodworking = folder with no URL attributes, cannot navigate to this page
/products/tools/woodworking/manual = folder with no URL attributes, cannot navigate to this page
/products/tools/woodworking/manual/saw = custom page type with URL attributes.

I'd also recommend NOT using underscores in your URLs, make them friendly by using a dash instead.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.