This project is read-only.

Render Custom Content Types on one Page

Topics: Core, Customizing Orchard, Troubleshooting
Jan 8, 2014 at 7:05 PM
Edited Jan 8, 2014 at 8:41 PM
I'm creating a affiliate directory for my site. I've created a custom content type called Affiliate with the fields:
  • Name (Text Field)
  • ​Title (Text Field)
  • ​E-mail (Input Field)
  • ​Phone Number (Input Field)
  • ​Website (Input Field)
  • ​Department (Text Field)
And parts:
  • ​Common
  • Menu
  • Publish Later
  • Tags
  • Title
  • ​Autoroute
I've created several of these content types, and want to render them all on one specific page with certain CSS styling (e.g. Name and Title within a <h3> tag; Email, Phone, Website, Dept within a <p>).

I've created a custom shape for the page called "Zone-Content-url-affiliates-beta2.cshtml".

However, I have no clue how to take the various dynamic data from the Affiliates Content Type and render it on the Affiliates page. I have read the walk-through 'Template file syntax guide' but it's not very linear on what to do for this; and I am not proficient with Razor by any means.

Therefore what should the code for the 'Zone-Content-url-affiliates-beta2.cshtml' page look like?

Also, am I "barking up the wrong tree" by creating a Custom Content Type? Should I be making a Projection, or something else?

Jan 9, 2014 at 1:03 AM
A custom content type sounds fine, but it's not quite clear what you're trying to do or why you'd have to override anything except for the layout. In particular, overriding zones doesn't seem like it would be achieving anything useful.
Jan 9, 2014 at 4:02 PM
What I'm trying to do is make a directory page, as mentioned in my first sentence. The directory listings must be sortable via keywords using isotope jquery. I have a basic example here: (which is based on but that is just using straight HTML.

I'm going to create a new thread as I've discovered I need to use projections.