SharePoint 2010 – publishing site Homepage(default.aspx)

layoutmastersharepoint-2010

Hello all and thanks for reading,

I have to make publishing site: homepage has the same elements as other pages BUT there are not the same width.
Imagine header,footer,left side menu and content.
Now what is the same:header and footer.
Left side: on home page it's wider than on other pages.
content part has jquery gallery that has different images for different pages.

Have to mention, this is for learning purposes only, it's like an test so when I learn to solve things like this I can start working.

Was thinking about other masterpage, but I found out that publishing site there can't be more than one default/custom masterpage.
Then Page Layouts: was thinking about this too but who would accept to manually input all links when ever new page is made?

For width, if it was php I would make if home page add body id="something" – can this be done with asp?

Now while I am writing, I just can't imagine how to make if part for gallery images too?

I am designer, know php, but don't know asp net.

Thank you, Suzy.

P.S- image: http://img151.imageshack.us/img151/8181/issueq.jpg

P.P.S. index/homepage left menu width 300px, on other pages width 200px

Best Answer

I recommend using SharePoint Designer to create a new Page Layout. You can use this Page Layout (named something like "HomePage.aspx"). You can copy the code from one of the existing page layouts that you want to use. Then add in the changes that you want. The CSS from Rich will get you started for some simple CSS changes to the menu width, but you may need more depending on the scope of your changes.

Then you just have to use the Page -> Page Layout option when in edit mode for the home page to set it to this new page layout. If needed, you may need to edit the allowed page layouts in Site Settings -> "Page Layouts and Site Template Settings" (/_Layouts/AreaTemplateSettings.aspx).

The advantage of this over using a Content Editor Webpart is that it is more robust. You don't need to worry about a contributor deleting your webpart accidentaly. You also get versioning with the _masterpages library (by default) allowing you to make changes and revert back if necessary. I've also found that SharePoint can re-write HTML that you add to content editor webparts which makes it harder to use them for HTML/CSS/JavaScript than it was in 2007.

Related Topic