customize browser tab title

  • 2
  • Question
  • Updated 3 years ago
  • Answered
when viewing a standard SFDC page, the title starts with "object name: name record name" (second tab in the screenshot attached).  when viewing a skuid page, the title equals "salesforce.com - Enterprise Edition" (first tab in the screenshot).  i'd like to override the tab title for skuid pages to match the format of the standard pages. 

here's the visualforce page:

<apex:page action="{!redirect}&page=LeadDetail" extensions="skuid.Redirects" standardController="Lead">
</apex:page>

any ideas?
Photo of Will Soupcoff

Will Soupcoff

  • 734 Points 500 badge 2x thumb

Posted 4 years ago

  • 2
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Will, try VF code that looks like this:

<apex:page standardController="Lead" extensions="skuid.Redirects" 
       showHeader="true" sidebar="false" readonly="true" docType="html-5.0"
       action="{!IF(canUseSkuid,'',redirect)}" title="{!Lead.Name}">
    <skuid:page page="LeadDetail" />
</apex:page> 

(Edited)
Photo of Will Soupcoff

Will Soupcoff

  • 734 Points 500 badge 2x thumb
Thanks, Rob!
Photo of Elissa Bradley

Elissa Bradley

  • 1,672 Points 1k badge 2x thumb
This doesn't seem to work with Page Assignments (I have different Skuid pages displayed for different Record Types). 

In my Visualforce Page, I use this: 

<apex:page standardController="Case"  extensions="skuid.Redirects" 
action="{!redirect}?objectType=Case&actionType=view"
</apex:page>

What should I use as my action if I want to rename the tab?  Seems like the "action" part of the below if the problem: 

<apex:page standardController="Case"  extensions="skuid.Redirects" 
showHeader="true" sidebar="false" readonly="true" docType="html-5.0"
action="{!IF(canUseSkuid,'',redirect)}"  title="{!Case.Subject}">
</apex:page>
 

 
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Yes it is possible.  Just set up a VF override page as shown above,  with the tab style and info properties you want.  Then make your tiles link to this VF page,  or to the object/action item you use it to override. 
Photo of Rimali Gurav

Rimali Gurav

  • 272 Points 250 badge 2x thumb
Thank you so much Rob its done...
Photo of Elissa Bradley

Elissa Bradley

  • 1,672 Points 1k badge 2x thumb
Hi Rob, 

I'm revisiting this issue - to recap:

 - I'm able to set the browser tab name by using the code your provided, but it messes up any page includes on the main page.  I re-read your comment about using the "Page Assignment" type of page include - I'm not using that, and am still having the issue.  I also tried just adding a title to my VF page (title="{!Case.Subject}"), but that has no affect on the browser tab.  

Just wondering if you have any new thoughts on this.  I realize the work-around may be to reproduce the content of my page include in the main page, but it's complex and I use it elsewhere...I'm worried about scalability when I need to edit it.

Thanks for any thoughts you have on this!
Photo of Elissa Bradley

Elissa Bradley

  • 1,672 Points 1k badge 2x thumb
Hi Rob, 

I'm revisiting this issue - to recap:

 - I'm able to set the browser tab name by using the code your provided, but it messes up any page includes on the main page.  I re-read your comment about using the "Page Assignment" type of page include - I'm not using that, and am still having the issue.  I also tried just adding a title to my VF page (title="{!Case.Subject}"), but that has no affect on the browser tab.  

Just wondering if you have any new thoughts on this.  I realize the work-around may be to reproduce the content of my page include in the main page, but it's complex and I use it elsewhere...I'm worried about scalability when I need to edit it.

Thanks for any thoughts you have on this!
Photo of Elissa Bradley

Elissa Bradley

  • 1,672 Points 1k badge 2x thumb
In case anyone is running into this same issue - I finally figured it out.  Key details: 
  • Follow this tutorial, particularly the "Prerequisites" part.  You need to create local copies of three of the VF pages in the Skuid package, or page includes won't display properly. 
  • This part of the VF code - action="{!IF(canUseSkuid,'',redirect)}" - does not reference page assignments, so if you need to render different pages for different situations, you need to add logic to the skuid:page VF component, like this: <skuid:page page="{!IF(Account.Type='Patient','SkuidPatientDetail','')}"