Generate Orchard CMS Autoroutes based on hierarchical menu

I have a set of custom content type pages in Orchard that are configured in the advanced menu like this:

Title: Parent Page Position: 1

Name: Children's page Position: 1.1

Name: Grandchild Page Position: 1.1.1

Currently, each has a URL that reflects the name (for example, / parent-page, / child-page, / grandchild-page).

How can I get urls for my custom content types to generate hierarchical urls (e.g. / parent-page, / parent-page / child-page, / parent-page / child-page / grandchild-page) automatically

-Carson

+3


source to share


1 answer


If you have a token for the parent, you can do what taxonomies do for their default alias template. Which brings me to the objection that I would have to pose to the question itself. It shouldn't be navigation that models the content structure, but the content structure that appears in the menu. So I'll start with a good content taxonomy and create a navigation. If you did, your URLs will be correct.



+2


source







All Articles