0

I have added a three column layout to my homepage. How can I remove them? I can only see how to remove contents, but not the columns itself?

Layout draft

  • Have you tried changing your page layout away from the 3-column layout? – James Jun 24 '16 at 16:26
  • You can create your custom page layout with desired number of columns or you can modify that existing page layout by downloading from http://<servername>/_catalogs/masterpage edit it re upload it. – Dikesh Gandhi Jun 24 '16 at 16:28
  • Is it a web part page or a wiki page? – Erin L Jun 24 '16 at 17:12
  • It's a web part page. I added a screenshot to specify. – Gottlieb Notschnabel Jun 24 '16 at 20:55
0

Without Pubslishing feature active you can do the following:

Open up your Web Part Page in SharePoint Designer. In there you will find an HTML table similar to this one:

<table class="ms-core-tableNoSpace ms-webpartPage-root" width="100%">
    <tr>
        <td id="_invisibleIfEmpty" name="_invisibleIfEmpty" colspan="3" valign="top" width="100%"> 
        <WebPartPages:WebPartZone runat="server" Title="loc:Header" ID="Header" FrameType="TitleBarOnly"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone> </td>
    </tr>
    <tr>
        <td id="_invisibleIfEmpty" name="_invisibleIfEmpty" valign="top" height="100%"> 
        <WebPartPages:WebPartZone runat="server" Title="loc:LeftColumn" ID="LeftColumn" FrameType="TitleBarOnly"><ZoneTemplate><... webpart 1 content...></ZoneTemplate></WebPartPages:WebPartZone> </td>
        <td id="_invisibleIfEmpty" name="_invisibleIfEmpty" valign="top" height="100%"> 
        <WebPartPages:WebPartZone runat="server" Title="loc:MiddleColumn" ID="MiddleColumn" FrameType="TitleBarOnly"><ZoneTemplate><... webpart 2 content...></ZoneTemplate></WebPartPages:WebPartZone> </td>
        <td id="_invisibleIfEmpty" name="_invisibleIfEmpty" valign="top" height="100%"> 
        <WebPartPages:WebPartZone runat="server" Title="loc:RightColumn" ID="RightColumn" FrameType="TitleBarOnly"><ZoneTemplate><... webpart 3 content...></ZoneTemplate></WebPartPages:WebPartZone> </td>
    </tr>
    <tr>
        <td id="_invisibleIfEmpty" name="_invisibleIfEmpty" colspan="3" valign="top" width="100%"> 
        <WebPartPages:WebPartZone runat="server" Title="loc:Footer" ID="Footer" FrameType="TitleBarOnly"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone> </td>
    </tr>
    <SharePoint:ScriptBlock runat="server">if(typeof(MSOLayout_MakeInvisibleIfEmpty) == "function") {MSOLayout_MakeInvisibleIfEmpty();}</SharePoint:ScriptBlock>
</table>

in your case, since you have filled some of the WebPartZones with content already, it will probably be much longer.

Up there you see the original 3-column layout with Header and Footer row. To get rid of the Webpart zones, simply restructure the HTML to your liking. if you want to combine the 3 columns into one without loosing their webparts , you will have to copy the content of the <ZoneTemplate>-tag of each of the <td>-tags (aka 'columns') you want to remove into the <ZoneTemplate>-tag of the <td>-tag that you want to keep and then you delete the <td>-tags that you want to remove.

Since Header and Footer don't span multiple columns anymore you have to remove their colspan-attribute.

Here is how it might look like afterwards, with the 3 columns in the center combined into one:

<table class="ms-core-tableNoSpace ms-webpartPage-root" width="100%">
    <tr>
        <td id="_invisibleIfEmpty" name="_invisibleIfEmpty" align="top" width="100%"> 
        <WebPartPages:WebPartZone runat="server" Title="loc:Header" ID="Header" FrameType="TitleBarOnly"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone> </td>
    </tr>
    <tr>
        <td id="_invisibleIfEmpty" name="_invisibleIfEmpty" valign="top" height="100%"> 
        <WebPartPages:WebPartZone runat="server" Title="loc:LeftColumn" ID="LeftColumn" FrameType="TitleBarOnly"><ZoneTemplate><... webpart 1 content...><... webpart 2 content...><... webpart 3 content...></ZoneTemplate></WebPartPages:WebPartZone> </td>
    </tr>
    <tr>
        <td id="_invisibleIfEmpty" name="_invisibleIfEmpty" valign="top" width="100%"> 
        <WebPartPages:WebPartZone runat="server" Title="loc:Footer" ID="Footer" FrameType="TitleBarOnly"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone> </td>
    </tr>
    <SharePoint:ScriptBlock runat="server">if(typeof(MSOLayout_MakeInvisibleIfEmpty) == "function") {MSOLayout_MakeInvisibleIfEmpty();}</SharePoint:ScriptBlock>
</table>

Please note that this procedure will customize the page so that it is no longer based on the site definition.

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.