This project is read-only.

Moving to Orchard

Topics: General
Apr 28, 2015 at 4:29 PM
I am new to Orchard but not to I have read and watched many of the video regarding configuring Orchard and creating modules. My company is moving away from SharePoint foundation because of several issues that we have with delivering a timely solution to our clients. Quite frankly I was against adopting it in the first place but that is another story. I have done quite a lot of SharePoint web parts development, and I would like to ask a couple of architecture questions about Orchard. If I am missing something obvious please tell me, as I have only been reading about this software for about a week and half.
  1. Orchard does not seem to have a well-defined document library system where users can upload files into one or more libraries. Is this something I will need to build?
  2. I notice that when I was creating a new content type you could not add multiple copies of a content type within the new one. For example you could not create a page type with three map content types on it. This is important because we have many pages that are just a collection of 4 or 5 of the same chart control with different data displayed. How would you approach this?
  3. Is it possible or practical to create a content type that just a collection of content types? Therefore, you could add the arbitrary number and types of content you needed for that page during editing. However, is this the wrong way of approaching this in Orchard?
I have many other questions but I will start with these.
Best Regards,
Apr 30, 2015 at 9:18 PM
  1. Orchard has a feature called Media Library where you can upload files into folders. The folder is your library if you will.
  2. Content Types cannot contain other content types - they represent a blueprint for content items of that type. You could create a custom content type with the ContainerPart attached, and configure that part to allow content of certain other content types to be added. Attaching the ContainerPart essentially turns your type into a list, which can contain many other items. I don't know enough about your requirements, so it's hard to say of this would be of any use to you.
  3. I recommend trying out the Lists feature in Orchard and see if it suits your needs.
May 3, 2015 at 1:23 PM
Edited May 3, 2015 at 1:25 PM
Orchard is built around a composition concept. Each content type is composed of several content parts, each of which adds some unique functionality (TitlePart adds a title, AutoroutePart adds a permalink, BodyPart allows an item to contain some HTML etc.). Then each part may contain one or more content fields.
In object-oriented world a content type is closest to an empty class. Parts can be though of as something like partial classes. And fields almost exactly resemble properties.

In your case the solution would be to use fields. There is a field called ContentPickerField which allows setting up N-M relationship between items. You can attach it to your "master" content type as many times as you need to.