Question

I have been creating different views on a list and have noticed that the page title is always the list name regardless of the view that was selected. Is it possible to change the title of Page to that of the view that was selected?

Was it helpful?

Solution 2

You can do this by modifying the .ASPX page for the view using SharePoint Designer. Just change the contents inside the tags shown below:

<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
    Whatever you want to be displayed in the Browser titlebar
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server">
    Whatever you want as the title shown on the page
</asp:Content>

OTHER TIPS

No need to use a framework, nor SharePoint Designer. If you have permission to add a Script Editor web part to your page, you can fix this with a single line of JavaScript:

<script type="text/javascript">
    // Replace default page title with document.title, which is based on view name
    document.getElementById("DeltaPlaceHolderPageTitleInTitleArea").innerHTML = document.title;  
</script> 

I've been using it to customize asset library views so the name of the view is included in the title on the page.

Here is a user-facing solution for Sharepoint 2013.

Create a text file called PageTitleAsHeader.js, containing the following code:

<script src="/_layouts/jquery/jquery-1.10.2.min.js""></script>
<script>
$("#ctl00_PlaceHolderPageTitleInTitleArea_SPTitleBreadcrumb1 > span > a").html(document.title);
</script> 
  1. Copy the file into your SiteAssets library and copy its URL.
  2. Go to your view and Edit Page.
  3. Insert Web Part - Media & Content - Content Editor.
  4. Edit Web Part.
  5. Paste in the URL from step 2 into Content Link.

This will change the onscreen page title (next to the logo) into the same title you see in the browser tab: the list name followed by the view name.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top