Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sharepoint 2010 (left and right Zones) - Remove

All I am trying to do is to remove the right zone of this site. How do I accomplish this? Is there any site in SharePoint that doesn't have zones?

enter image description here

like image 239
MicroSumol Avatar asked Dec 12 '22 13:12

MicroSumol


2 Answers

Web Part Zones are part of the Page Layout that your page instance is using. To remove a Web Part Zone you can:

  • Edit the page in SharePoint Designer. Before placing the page into edit mode, SharePoint Designer will ask if you want to detach from the Page Layout. Once you do, you can now format the page however you would like.
  • Create a custom Page Layout based on the out of the box Page Layout with the right zone removed. After your custom Page Layout is deployed or uploaded, you can associate your page with that layout.
  • Hide the zone with custom CSS. The easiest way to do this is to add a Content Editor Web Part onto your page with the CSS to hide the zone.
like image 139
Rich Bennema Avatar answered Dec 25 '22 17:12

Rich Bennema


On the content Editor just insert the following and it works:

<script>

function HideWebPartZone()
{
  var x = document.getElementsByTagName("TD")
  var i=0;
  for (i=0;i<x.length;i++)
  {
    if (x[i].width=="70%")
    {
      // left column
      x[i].style.width="100%"; 

      // center (otherwise empty) column
      var x2=x[i].nextSibling;
      x2.style.width="0";
      x2.style.display="none";
      x2.innerHTML=""; 

      // right column
      x2=x[i].nextSibling.nextSibling;
      x2.style.width="0";
      x2.style.display="none";
      x2.innerHTML=""; 

      // right margin column
      x2=x[i].nextSibling.nextSibling.nextSibling;
      x2.style.width="0";
      x2.style.display="none";
      x2.innerHTML="";
      //all done
      return;
    }
  }
}


_spBodyOnLoadFunctionNames.push("HideWebPartZone")

</script>
like image 33
MicroSumol Avatar answered Dec 25 '22 17:12

MicroSumol