Tim Almond
Tim Almond

Reputation: 12726

Making a different type of home page in Orchard

I've just started with the Orchard CMS and I can see that I can create a page and have different widgets on them, but I need the homepage to have a different layout.

I'd like to have some sort of different cshtml file for the homepage, but I can't seem to work out how to do it from the documentation. I also need to have four text areas on the home page that aren't on the main page.

Can someone who has done this point me in the right direction?

Upvotes: 0

Views: 2867

Answers (3)

taazaa
taazaa

Reputation: 159

You should use designer tools module if you are using Orchard 1.1 +. Just search for Shapes in the admin and install the tools. Then you can create Alternates by reviewing the shapes in-browser.

In your case you should be able to create a view with the name: Content-url-homepage.cshtml

Upvotes: 1

Bertrand Le Roy
Bertrand Le Roy

Reputation: 17814

You can try this to vary the homepage layout: http://weblogs.asp.net/bleroy/archive/2010/12/14/switching-the-layout-in-orchard-cms.aspx

Orchard 1.1 will also give you a homepage alternate out of the box.

Upvotes: 0

Andrew
Andrew

Reputation: 10033

This may help you, it's a post I found about making your own themes and is a fairly simple example but covers what you are looking for:

http://www.nogginbox.co.uk/blog/theming-orchard

/Views/Content-11.cshtml

I wanted to display the content on my homepage slightly differently than other pages. My homepage has an ID of 11 so I was able to reference it with a file called Content-11.cshtml. I could also have created a template for all blog post content using a file called Content-BlogPost.cshtml had I needed to do so.

Upvotes: 0

Related Questions