Add snippets in Page layout using design manager

Santhosh Babu
 
Technology Specialist
January 5, 2014
 
Rate this article
 
Views
29606

In this post I am going to add a Web Part Zone snippet in page layout.

Step 1: Open the site then click design manager link from right top corner "Settings" menu.

clip_image002

Step 2: Click “Edit Page Layouts” link

clip_image004

 

Step 3: Click “SamplePageLayout” .It will open preview page.

clip_image006

 

Step 4: Once open the preview page then click Snippets menu from top right side. It will open “Snippet Gallery” in new tab page.

clip_image008

 

Step 5: Click the Web Part Zone menu item in “DESIGN “tab.

clip_image010

 

 

 

 

Step 6: In this page we can easy to configure component properties. Now, I will change the Web part Zone Title under Misc category. After customization must click the update button then only the changes are reflected in the component snippet.

clip_image012

Step 7: Once click the update button the HTML code automatically generated in the “HTML snippet” box and click “Copy to Clipboard” button.

clip_image014

 

Step 8: Open the mapped network drive then open the page layout HTML file and paste HTML snippet where you want the web part zone to show.

clip_image016

Step 9: We should add the HTML snippet inside of the <asp:ContentPlaceHolder ID="PlaceHolderMain" runat="server">. In my example I am remove all the default div tags (inside of the content place holder) and paste with my HTML Snippet content.

Default content

clip_image018

Replaced Content

 

clip_image020

Step 10: Once complete the activity the save the page and publish the page layout in design manager.

clip_image022

Step 11: Open the sample page (which we have used in “SamplePageLayout”) and click edit and try to “Add a Web Part”. You will see the web part zone title in the “Add part to” drop down.

clip_image024

clip_image026

 

Next Blog I will explain the create design manager master page package.

Happy Coding.

SanthoshBabu ManickaMohan

Author Info

Santhosh Babu
 
Technology Specialist
 
Rate this article
 
Working as a Technology Specialist in SharePoint ~ Cognizant ...read more
 

Leave a comment