0

I'm new to sharepoint 2010. I am modifying a master file but I'm not quite sure how everything works.

I have added a mainplaceholder in the master template.

In the web interface I can add a web part to this. However the layout is not how I want it.

I would like two columns with three rows. A web part should be in each.

From the browser when I change the layout to two columns and add a web part it always adds it to the first column. I can't seem to add a webpart to the second column.

In the master file it looks like I could create a table layout - but how do I then add a web part in the cell?

I think I'm missing out on a key concept somewhere.

1
  • Hi! And welcome to SP.SE. This question is very broad I'm afraid. Is it possible for you to narrow it down by being more specific about where you are stuck, and how the code /markup looks right there? @Dave Paylor also rises a very good question in his answer, should this layour eally be on every page och should you instead use a page layout? Nov 5 '13 at 8:06
1

in your masterpage you only have <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server"/> to contain other webpart zones, within that palce holder you add as many zones as you like!

so in my master I have:

<asp:ContentPlaceHolder id="PlaceHolderMain" runat="server"/>

in my layouts i have:

<div class="webpartblocks" style="display: inline-block; width:1350px;position:absolute;z-index:1;left:218px;top:72px">
    <div style="position: absolute; width: 407px; height: 164px; z-index: 2; left: 908px; top: 67px;" id="layer3">
        <div style="display: inline;">
            <div style="display: inline;position:relative">
                <div id="zone1" class="box small med-blue"  style="height:160px;margin-right:3px;overflow:hidden">
                    <WebPartPages:webpartzone id="g_1A53ED927B828ACC85F439EC50D711D1" runat="server" title="Zone 1.1"><ZoneTemplate></ZoneTemplate></WebPartPages:webpartzone>
                </div>
            </div>
            <div style="display: inline;">
                <div id="zone2" class="box large lt-yellow" id="Zone2"  style="width:250px;height:160px;margin:0px 0px 0px 0px;overflow:hidden">
                    <WebPartPages:webpartzone id="g_4A588E3AB09F4049AD622C740015CDB6" runat="server" title="Zone 2"><ZoneTemplate></ZoneTemplate></WebPartPages:webpartzone>
                </div>
            </div>
        </div>
    </div>
</div>

above is added within layouts.aspx file that is linked to the masterpage, this is adding two webpart zones that are side by side. They are also a fixed width and height! to have them auto width and height just remove them!

1
  • As a note to 2013 users, the rich content areas can place a web part directly inside a table you generate from a simple page edit.
    – Hugh Wood
    Nov 5 '13 at 22:14
0

Firstly, do you really want this on every page? If not then perhaps a page layout would be a better option.

Either way, you can create any sort of layout you like using standard HTML and then place web parts in each div or td depending on how you do it. If you want users to be able to change the web parts then you should start with web part zones and place the web parts inside the zones.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.