Reputation: 516
I have a set of custom content type pages in Orchard that are set up in an advanced menu like so:
Title: Parent Page Position: 1
Title: Child Page Position: 1.1
Title: Grandchild Page Position: 1.1.1
Right now each has a URL that reflects the name (eg., /parent-page, /child-page, /grandchild-page).
How can I get the URLs for my custom content types to generate hierarchical urls (eg., /parent-page, /parent-page/child-page, /parent-page/child-page/grandchild-page) automatically?
-Carson
Upvotes: 3
Views: 1211
Reputation: 17814
If you have a token for the parent, you can do what taxonomies are doing for their default alias pattern. Which brings me to the objection I would have to the actual question. It should not be the navigation that models the structure of contents but rather the structure of the contents that is reflected in the menu. So I would start with a good taxonomy of the contents and generate navigation from that. Your URLs would be right immediately if you did that.
Upvotes: 2