This project is read-only.

Assign Templates To Pages?!

Topics: Core, Customizing Orchard, General, Troubleshooting
Aug 9, 2012 at 8:45 AM

Sorry I've just started getting in to Orchard. Apologies if this may seem obvious but how do you assign a template to a page.. say for example I have the concept of:


1. A general content page - has a header, some rich text, optional images etc

2. A listing page - lists a bunch of child pages (i think from what I've read this is a projection)

3. An accordion page - a page with an accordion with headings that then expand contract


these examples are all arbitrary.. but yes I'm trying to work out if you have something that is a "page" on the orchard site.. how do you determine how it looks!?


Is every different layout supposed to be represented as a module?



Aug 9, 2012 at 9:54 AM

Different types of "pages" are items of different content types in Orchard: e.g. you'd have a Page (nr..1), a Projection Page (nr. 2)... An accordion page would probably be also a new content type, having ProjectionPart or ContainerPart for listing other items, but with a shape override for making the simple list into an accordion (if it isn't possible with JS alone).

Aug 9, 2012 at 11:27 AM

Thanks so much for the reply!

so is there a good tutorial on applying templates to different content types.. i was taking a look at the blog module to see how it's view is constructed.. but thats a module... I can't seem to see HOW a contact type gets a different layout representation in the view.. The documentation is a bit light at this stage..

Aug 9, 2012 at 11:33 AM

You need alternates to override the rendering of anything, targeted at e.g. content types.