
Adding a page
Pages in SharePoint are a means to display information and content to the users of your site. A SharePoint page is just like a page on any other website, except that you, as a contributor to or owner of the site, have access to modify it through easy-to-use page editing tools built into the platform. You can use these tools to format and style the pages, as well as maintaining a variety of content on them.
In this recipe, you will learn how to add a new page to your site.
Getting ready
You will need one or more of the following permission levels in your site to be able to add pages to it: Contribute,Edit, Design, or Full Control.
How to do it...
To add a new page to your site, browse to the site's home page and follow these steps:
Click on New and then Page from the navigation bar, as shown in the following screenshot:

Then, select a template from the list of available page templates. For our example, we will select the Blank page template.
Click Create page to create the new page.
SharePoint will then take you to the newly created page. Here, you can give it a title and, optionally, start adding content to this page.
You can then click the Save as draft button to save the page as a draft, as shown in the following screenshot:

At this point, SharePoint will generate a URL for the page.
If you'd like to, you can also click the Publish button toward the top right of the page to make your page visible to others.
Congratulations! You just published your first page.
How it works...
Pages in SharePoint are similar to documents that live in a document library. The main differences between documents and pages are as follows:
Pages are typically stored in special libraries, called Site Pages.
The permissions needed to edit pages are different from the permissions required to edit documents in a library.
You can edit the content of a page using tools built right into SharePoint.
Once you've created your page, you can enter or modify some basic information.
Entering basic page information
For your new page, you can do the following:
Give it aTitle
Change the name of the contact person for the page (or completely remove it from the page)
Change the layout for the title area
Show or hide the date that the page was published
Enable or disable page comments
At this point, you can also start adding content to your page, but we'll cover that in more detail in the next recipe. Once you have added content to the page, you will need to publish it so that it is visible to other users.
Publishing a page
A page can go through various stages in the publishing process before it is visible to others in your organization.
When you create a New page, the page gets saved as a Draft. At this point, the page is only visible to you and to others who have contributor access or higher to the Site Pages library. The site visitors will not see any draft pages or versions.
You can then continue to edit the page and save it as a draft until you are satisfied with the changes. You can Publish the page once you have finalized its content. This changes the status of your page to Published. The page and its content now become visible to others that have access to your site. Your page will now also start showing up in the relevant searches. Additionally, you may want to add a link to your page from one of the navigation menus or from another page so that users can easily locate it. We'll discuss the SharePoint navigation menus in more detail as part of the Modifying the top navigation and Modifying the left navigation recipes, later in this chapter.
Once the page has been published, you can come back to it any time and Edit it to make changes to it. To do so, simply browse to your page and click the Edit button in the top-right corner of the screen, as shown in the following screenshot:

From that point on, you will go through the same editing and publishing process that you followed while creating a new page. Similar to before, you can continue to save your changes as drafts (which means they will only be visible to you and other contributors of the site). You can also Republish the page to make your changes visible to others:

You can also configure the publishing process via the Site Pages library so that all the pages on your site go through a formal approval workflow before they become visible to others.
The Site Pages library
All pages get stored in a special library called Site Pages. This library is just like any other document library, except that it has certain capabilities tailored toward creating and managing pages. To browse to the Site Pages library, simply browse to the Site contents page, as described in the Viewing Site contents recipe in Chapter 2, Introduction to SharePoint Online. Then, click Site Pages.
The first thing that you will notice in this library is that the pages are grouped by the page author. You can change this view by selecting the various view options toward the top-right corner of the library, as shown in the following screenshot:

We'll discuss views in more detail in the Creating a custom list view recipe in Chapter 4, Working with Lists and Libraries in SharePoint Online.
The next thing you will notice if you are ina Team site is that the list of pages in the New menu shows Wiki Page and Web Part Page options, in addition to the usual option to create a Site Page. Please note that these page types are now deprecated and should not be used to render the modern site experience.
Thirdly, if you click Automate and then Power Automate from the library menu, you will notice an option to Configure page approval flow:

There's more...
In this section, we will understand a little bit about the page approval workflow. We will then review a special type of modern SharePoint page called the News post. Finally, we will look at how to delete a page from a site.
Content approval
A lot of large organizations require that page additions and modifications go through an approval process before new pages or changes to existing pages become visible to others. The Configure page approval flow option enables you to do just that. We will learn more about automating such approval tasks in Chapter 13, Power Automate (Microsoft Flow). Please read this Microsoft Docs article if you want to learn more about the page approval flow: https://m365book.page.link/Page-Approvals.
You will start seeing the Submit for approval button instead of the Publish and Republish buttons once you turn on approvals for your library:

Clicking Submit for approval will result in the approval flow starting, which lets you add a message and submit the page for approval:

The respective approvers will then receive an email, notifying them of the approval request. They can then click the Approve link from that email to view the approval request and approve the page through Power Automate:

Once approved, the changes you made to the page will become visible to the site's visitors.
To turn off page approvals again, simply turn off the Content Approvalsetting from the Versioning settings page for the library. Please refer to the Versioning settings, content approval, and document checkout recipe in Chapter 5, Document Management in
SharePoint Online, to learn more about how to do that.
News post and news link
A news post is a type of page that enables you to publish news, announcements, and updates, and create engaging stories about your department or organization. This content can then be automatically surfaced in different places through the various web parts and channels within and outside of SharePoint. The two ways that a news post differs from a regular site page in SharePoint are as follows:
News posts surface through various pre-built web parts and channels.
You cannot create news posts directly using the New menu from the Site Pages library. However, you can create them from the Create news post option from the top of the SharePoint home/start page. Please refer to the Getting to the SharePoint home page recipe in Chapter 2, Introduction to SharePoint Online, for details on how to browse to the SharePoint home page. You can also create news posts by clicking the New menu option and then News post from the top of any page in your modern Team or Communications site.
One of the other options that you will notice when you click the New menu mentioned in this recipe is a news link. While a news post lets you create and publish new content as a news post, a news link lets you create a link to existing content and surface it as a news post. In addition to promoting content from within your SharePoint sites, you can also promote external content such as the news from your external site.
Creating, maintaining, and having news posts or news links surface in various places is a relatively large topic and beyond the scope of this book. You can, however, refer to the following Microsoft support articles for more details on how to do that:
Create and share news on your SharePoint sites: https://m365book.page.link/Create-News
Use the News web part on the SharePoint page: https://m365book.page.link/News-WebPart
Create an organization news site: https://m365book.page.link/News-Site
Finally, this resource lists some compelling use cases for creating SharePoint news pages: https://m365book.page.link/SP-News
Deleting a page
The only way to delete a page is from the Site Pages library. To delete a page, simply browse to the Site Pages library within the site, select the page you would like to delete, and then click the Delete option from the library menu, as shown in the following screenshot:

In general, this is also how you can delete documents from within any document library, or items from with any list in SharePoint. Please refer to the Deleting an item section of the Adding an item to a list recipe in Chapter 2, Introduction to SharePoint Online, for more details about deleting items and documents from SharePoint lists and libraries. Additionally, the Viewing Site contents recipe in Chapter 2, Introduction to SharePoint Online, discusses the site recycle bin. The site recycle bin is where deleted pages are stored until they are permanently deleted.
See also
The Viewing Site contents recipe in Chapter 2, Introduction to SharePoint Online
The Audience targeting topic of the Adding a web part recipe, later in this chapter
The Creating a custom list view recipe in Chapter 4, Working with Lists and Libraries in SharePoint Online
The Versioning settings, content approval, and document checkout recipe in Chapter 5, Document Management in SharePoint Online
Chapter 13, Power Automate (Microsoft Flow)