Sharepoint - Add web part zone in custom page layout

SharePoint 2013

In 2013 you can use design manager for generating web-part zone snippet.

  1. To insert a Web Part zone snippet
  2. Browse to your publishing site.
  3. In the upper-right corner of the page, choose the Settings gear, and then choose Design Manager.
  4. In Design Manager, in the left navigation pane, choose Edit Page Layouts.
  5. Select the name of the page layout that you want to add the snippet to.
  6. To open the Snippet Gallery, choose Snippets in the upper-right corner of the server-side preview.
  7. On the ribbon, on the Design tab, choose Web Part zone.
  8. On the right side of the Snippet Gallery, under About this Component, click or select section headers to expand or collapse groups of properties, and then configure any custom settings that you want.
  9. After you configure any properties, choose Update. This updates the HTML snippet on the left side of the page, so that the markup reflects your custom settings. You can always choose Reset to return all properties to their default settings.
  10. On the left side of the Snippet Gallery, under HTML Snippet, choose Copy to Clipboard.
  11. In your HTML editor, open the mapped network drive on your computer, and then open the HTML file for the master page or page layout that you're adding the snippet to.
  12. In the HTML file, paste the snippet where you want the markup to appear.
  13. Replace the <div> where class="DefaultContentBlock" with your own specific content.
  14. If you want to prepopulate the zone with Web Parts—for example, if the zone will restrict content authors to modifying only existing Web Parts and not adding new ones—insert Web Part snippets where the <!--DC … --> tag appears.
  15. Save the page, and then refresh the server-side preview in Design Manager to make sure the page appears as expected.

http://msdn.microsoft.com/en-us/library/office/jj862341(v=office.15).aspx

Design Manager generates snippet in following format

<div data-name="WebPartZone">
    <!--CS: Start Web Part Zone Snippet-->
    <!--SPM:<%@Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
    <div xmlns:ie="ie">
        <!--MS:<WebPartPages:WebPartZone runat="server" ID="x0e5f5212505f48a9aac43df13eeae4f9" AllowCustomization="True" AllowPersonalization="False" FrameType="TitleBarOnly" LockLayout="True" Orientation="Vertical">-->
            <!--MS:<ZoneTemplate>-->
               <!--DC: Replace this comment with default web parts for new pages. -->
            <!--ME:</ZoneTemplate>-->
        <!--ME:</WebPartPages:WebPartZone>-->
    </div>
    <!--CE: End Web Part Zone Snippet-->
</div>

You can copy this into Page Layout (html) file.

SharePoint 2010

  1. Open the page layout in SharePoint Designer
  2. Place cursor inside the div where you want to place the webpart zone
  3. From Menu, Select Insert -> Web Part Zone
  4. Save and Publish the Page Layout

Add the following snippet:

<WebPartPages:WebPartZone runat="server" Title="TestZone1" ID="TestZone1">
<ZoneTemplate></ZoneTemplate>
</WebPartPages:WebPartZone>

It works.