Creating/Structuring content types in Orchard Core (for themeing)

38 views Asked by At

I'm trying to learn how to create custom Themes for Orchard Core CMS, I have figured out how to create a basic layout with a menu and pages to navigate between, and am now trying to understand how to create and display custom content types in various ways.

I have had trouble figuring out how to achieve my goal below using the documentation and examples and hoping someone can provide some hints!

For example, I would like to create the following:

  • A landing/home page which includes a summary of a selection of featured services
  • A "Services" page with list of services and a summary of each
  • A "Service Detail" page (template) to present more details for each Service.
  • and of course the Services themelves

Preferably only creating one Content Item per Service, then displaying the summary on the Home & Services pages and the full detail on the Service Detail page.

So I have created Content Types for "Service Item" and "Service List"

Service Item Parts & fields

  • Text field: Title
  • Text field: Description
  • Text Field: Summary
  • Boolean field: Featured

Service List Parts

  • Title
  • List Part (with Service Item as the enabled Content Types)
  • With widget stereotype to allow use in Flow

I also have a very basic Page Content Type which accepts Flow parts.

Now I thought that from here I should be able to create a Page, add the Service List as a widget on the page, then display the summary version, doing something similar for the Services page, and I figured I'd have to create a template file for the Service Details which could then display the details for each, similar to how clicking on a "blog post" in the blog recipe example shows the blog detail.

So now I can create the Service Items, and I can create a Service List and create Service Items within it, but I cannot figure out how to

  • Create a Service Item and then ADD it to a list
  • Add the Service List including items to a Page (I can add an empty list)

I cannot even add items to an empty Service List already added to a Page

  • If I try to Create a service item, I get a NullReferenceException

  • If I try to Edit the Service List (or 'list items'), I get "The page could not be found."

Surely what I am trying to achieve should be possible? Do I need to come at it from another angle? Can anyone provide any guidance please?

0

There are 0 answers