SharePoint 2010: Add a WebPartZone to a Team Site

Have you tried to add a webpartzone to a SharPoint 2010 Team Site page in SPD? You can, but you will find that you cannot add webparts to the zone in the browser. In my opinion this partly defeats the purpose of adding a webpart zone in the first place. But wait, there is really good news!

You probably do not need to add webpart zones to a team site in SharePoint 2010. Why? Well, Team Sites in SharePoint 2010 use a wiki content div which allows you to add web parts directly inline with text in the different zones created in the layout you choose.

If you open up a content page in SPD, look for the following code block:

<SharePoint:EmbeddedFormField id="WikiField" FieldName="WikiField" ControlMode="Display" runat="server">
<div>...
<span id="layoutsData" style="display:none">true,true,3</span>
</div>
</SharePoint:EmbeddedFormField>

This is where the magic happens. SharePoint’s EmbeddeFormField tag inserts a Wiki control into the page in question. The “content” of the control will go where the … are.  What about the span, <span id=”layoutsData” style=”display:none”>true,true,3</span>? This defines the layout of the control. The first boolean value is if a header should be included, the second boolean sets if a footer should be included and the number can be between 1 and 3, which defines how many columns are included. In the example provided,  (header, footer, 3 col). Side note, I have been told quite a few times that there are the only layout options available. If it’s possible to add more layout options, it’s not easy.

What is really cool is that with these layout options and that fact that you can add html, css and webparts all inline with content, you can get almost any layout you want with any mixture of webparts and text, all updatable via a web browser.

Nice huh?

Leave a Reply

Your email address will not be published. Required fields are marked *

Human Check *

Filed Under

It's time for our next webinar! Don't miss our first webinar of the year "The Future of Intelligent Communications"… https://t.co/U9kIE2rM0C

GA of #SharePoint Migration tool https://t.co/CM8kKAhY2p

SharePoint Conference North America 2018 returns to the MGM Grand Las Vegas, May 21 - 23. https://t.co/WAJp2nJShj R… https://t.co/L6sNmxUM0Q

It's time for our next webinar! Don't miss our first webinar of the year "The Future of Intelligent Communications"… https://t.co/xu6CTbxtG5

It's time for our next webinar! Don't miss our first webinar of the year "The Future of Intelligent Communications'… https://t.co/mx53YrFr6o