In the following illustration, you see the general areas of a page controlled by the master page and those areas controlled by the content page.
On a typical SharePoint Team site (based on one of the site templates included with SharePoint), you see that the top and left regions come from the master page, while the middle and right regions come from the content page, in this case, the home page.

Note These illustrations provide highly-simplified examples of the master page - content page relationship. In actuality, there are several regions of a content page, like the title and description regions, that are located in the same areas as the master page content.
While the master and content pages are separate, they are merged together at runtime to display as a single web page in the web browser. Both pages are ASP.NET pages, but master pages have a .master file extension and they contain the necessary ASP code and content regions to render both pages on a SharePoint site.
To actually see the master page or content page separate from one another, you would need to open them in a supported page editor like SharePoint Designer 2010, which includes design-time support for editing content and master pages.
Top of Page
In the v4.master page in SharePoint 2010, there are approximately 33 content placeholders that are used to display content and functionality on a SharePoint site. You can see these controls when you open the master page directly. In SharePoint Designer 2010, you can use the Manage Content Regions feature to locate each content placeholder control on the page. You can view the control in both code view and the WYSIWYG editor. In the below example, you see the PlaceHolderSiteName control that is used to display the name of the site.
Another content placeholder that is particularly important is PlaceHolderMain because this is what gets replaced by each content page when that page is viewed in a web browser.
You can change the layout of content on a SharePoint site by changing the location of the content placeholder controls. You may, for example, choose to add more content to the right side of the page. You could do this by adding it to the right side of the master page.
Important When you customize master pages, avoid deleting content placeholders. Doing so might break some pages and even sites associated with the master page. It’s a good practice to simply hide instead of delete these controls.

On a typical SharePoint Team site (based on one of the site templates included with SharePoint), you see that the top and left regions come from the master page, while the middle and right regions come from the content page, in this case, the home page.

Note These illustrations provide highly-simplified examples of the master page - content page relationship. In actuality, there are several regions of a content page, like the title and description regions, that are located in the same areas as the master page content.
While the master and content pages are separate, they are merged together at runtime to display as a single web page in the web browser. Both pages are ASP.NET pages, but master pages have a .master file extension and they contain the necessary ASP code and content regions to render both pages on a SharePoint site.
To actually see the master page or content page separate from one another, you would need to open them in a supported page editor like SharePoint Designer 2010, which includes design-time support for editing content and master pages.

Master page content placeholders
Master pages and content pages work together using a set of replaceable regions, or content placeholder controls. Each content placeholder (which appears as ContentPlaceHolder in the page code) represents content that can be overridden on the master page. Any page on the site can replace whatever is contained within the content placeholder by supplying a matching content control. That content control can even be empty, which would remove the element entirely from the rendered page.In the v4.master page in SharePoint 2010, there are approximately 33 content placeholders that are used to display content and functionality on a SharePoint site. You can see these controls when you open the master page directly. In SharePoint Designer 2010, you can use the Manage Content Regions feature to locate each content placeholder control on the page. You can view the control in both code view and the WYSIWYG editor. In the below example, you see the PlaceHolderSiteName control that is used to display the name of the site.

Another content placeholder that is particularly important is PlaceHolderMain because this is what gets replaced by each content page when that page is viewed in a web browser.
You can change the layout of content on a SharePoint site by changing the location of the content placeholder controls. You may, for example, choose to add more content to the right side of the page. You could do this by adding it to the right side of the master page.
Important When you customize master pages, avoid deleting content placeholders. Doing so might break some pages and even sites associated with the master page. It’s a good practice to simply hide instead of delete these controls.
No comments:
Post a Comment