In the world of SharePoint there are different type of Professionals:
- SharePoint Administrator
- SharePoint Developer
- SharePoint Architect
- SharePoint Designer
All the companies won't be able to accommodate all these Professionals. In such cases an Administrator will do the Job of others & vice-versa.
Pages in SharePoint
As you know, each page in SharePoint is constructed through a lot of server-side processing. Some part of page will be in the file system, some come from the content database & there will be lot of role specific content too.
Following is the URL of my home page:
Following is the URL of my list page:
We can use SharePoint Designer to edit the page.
The editing operation can include:
- Add / Edit / Delete of HTML Code
- Add / Edit / Delete of CSS Code
How to edit the Page?
Please follow the steps to edit a page.
Step 1: Open SharePoint Designer
Step 2: Open SharePoint Site
Click on the Open Site button & enter your Site URL.
You will get to see the site opened as shown below:
Step 3: Add following Code
We are trying to Edit the AllItems.aspx page of list named Expense. Some pages won't exist until it is first time edit.
Go to File menu and click the Open button.
Enter the URL of the page.
Click the Open button. You will get the following page in Design Mode.
Click on the Code View tab on the bottom. You will see the following code view.
Please note that there are certain area colored in Orange. These areas are coming from the site definition & in order to edit that you can use the Advanced Mode button from the tool bar.
Scroll down to the end & enter the following code in highlighted section.
Save the changes to the file.
Step 4: Test Changes
Refresh your list > AllItems.aspx & you can see the change is reflected.
In the same way you can add <script> tags, <style> tags into the html pages. There are specific sections you need to study, for advanced manipulations.
I recommend SharePoint Designer Certification or Course to do that.
When to revert the Changes?
We can Revert the changes on scenarios like:
- When pages are slow
- Page is corrupted
How to revert the Changes?
You can choose SharePoint Designer > Open Site > All files option.
In the appearing page on the right, choose Lists > Expense. You will get the following page.
Click AllItems > Toolbar > Reset to site definition
Confirm the Prompt & Save Changes. Your file is now reverted back.
In this article we have explored how to Edit & Revert a SharePoint Page using SharePoint Designer. I hope this will be useful in real life scenarios.