Orchard CMS: Setting Content Type Urls to include type
I finally took a look at Orchard and I find it very impressive. One thing has me confused, however.
It appears that all content items and pages created are set as relative to the root. The only excepti开发者_C百科on to this appears to be the blog, where a post is set to be a subpage of the blog that contains it.
How do I get my custom content type to mimic this behavior?
I'm not sure how this is done under the covers but the container and containable parts result in the same effect.
Create customType A and add the container part. Create customType B and add the containable part.
Create a content item of type A (itemA). Create a content item of type B and add it to itemA.
You should then be able to navigate to /itemA/itemB if you set the slugs accordingly.
There is a slight nuance in the content create screen where the slug's path will be missing 'itemA' but it will show up when you refresh.
精彩评论