All posts tagged Publishing

Hiding Empty Publishing Fields in a Page Layout

Most of the time when you’re rendering web content that content will exist in a container or have a header or a footer, etc. If you’re rendering an HTML publishing field within SharePoint the user could have simply left the field blank (unless you make the field required of course). In this case you probably don’t want to render the container/header/footer if there isn’t going to be any content. So let’s get down to business…

Continue reading →

Deleting a Page Layout or Master Page that is no longer referenced

There is a fairly well known bug that prevents you from deleting both page layouts and master pages even though they are no longer in use. If you do try to delete either a page layout or master page you will receive the following error:

“This item cannot be deleted because it is still referenced by other pages. “

There is a workaround for this problem but it requires SharePoint designer. Here is my similar solution except that no SharePoint designer is required.

  1. Browse to the “Master Page Gallery”.
  2. Select “Actions” and “Open with Windows Explorer”
  3. Right click on the white area and select “New” > “Folder”
  4. Drag the page layout or master page into the new folder
  5. Right click on the new folder and select “Delete”
  6. Confirm the box

Done!

Updating an Underlying Page Layout

Just a quick post as someone recently asked me this question and it is fairly hidden in the site.

Although changing the page layout of an existing page could be considered equivalent pulling the carpet out from under something it is possible none-the-less. Keep in mind however that if any data was displayed on the page that is not accounted for in the new page layout then that information will no longer be seen by your users. Also if you had web part zones the web parts will probably need reorganizing as they will fall into different zones.

  1. Bring up the publishing toolbar by selecting Site Actions > Edit Page
  2. From the publishing toolbar select Page > Page Settings
  3. From the page settings screen you can select a new page layout and save your changes by clicking “Ok”