0

I have created an aspx page under Site Pages and when I open it in the browser, it does not have any template attached to it and it just shows a blank page. How to add a masterpaage template to that page, so that I get the same look when I open a custom list.

  • see the pages those are already attached with master page – Atish Dipongkor - MVP Nov 5 '15 at 17:56
  • when I add this MasterPageFile="~masterurl/default.master" to the page tag, it throws an error – Keerthi Nov 5 '15 at 18:03
1

When assigning an existing .aspx page to a master page all the basic elements of a web-page now resides with the master page like head, body, title etc. Hence if your page is using these elements for purpose like giving title to the webpage, defining javascripts in the tag... all these operations now need to be done on the master page. But if you need to assign these elements the respective values at child - page level then you need to define a content place holder in the head tag of the master page. Another content place holder should be placed within the body of the master-page.

At the child-page you will be having two content place holders, one for head and other for body. After which you will need to put the needful code in the respective content place holders.

Open the page in SharePoint Designer and add master page reference at the top in code view of the page.

For more information : https://support.office.com/en-au/article/Create-a-content-page-from-a-master-page-0488085e-9a2c-4935-9aeb-18817ab22760

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.