Skuid Home Page Hyperlinks

  • 4
  • Question
  • Updated 3 years ago
  • Answered
I have created custom home pages for each profile in my company based on what they need to see.  Using the filtered views this has been amazing because I can keep pertinent actionable information in front of them.  For instance contracts that are expiring in 30 days, caseloads, services that have not been fulfilled etc.

One question I have is, if a user clicks on an account or object name (which is hyperlinked to the record) it always opens in the home page window (I assume it is an i-frame or something similar).  Which creates a smaller work area and double menus.  Is there a way to, on the home page, for the link to be opened in the main window.  Can this be done without adding special new fields etc?

Thanks!
Photo of Rich Slack

Rich Slack

  • 4,134 Points 4k badge 2x thumb

Posted 4 years ago

  • 4
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Rich.  You need to add this little bit of code to the Skuid page you are using on the home page.  Create a Javascript resource of type "In-Line".   Here is the code: 

(function(skuid){
var $ = skuid.$;
$(function(){
$('head').append(
$('<base target="_parent">')
);
});
})(skuid);

This is explained in step 15 of the Home Page tutorial:   But that's pretty well buried,  so no worries. 
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Add the following as an Inline JavaScript Resource to your skuid pages that you're using for the home page. What it does is add an HTML base tag to your page making all links relative to the parent window (e.g. outside the iframe in which your VF page that includes your Skuid Pages is inside of):

(function(skuid){    
    var $ = skuid.$;
    $(function(){
        $('head').append(
            $('<base target="_parent">')
        );
    });
})(skuid);
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
And Rob WINS!!
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Zach gets style points.

I'm working I swear!
Photo of Rich Slack

Rich Slack

  • 4,134 Points 4k badge 2x thumb
Brilliant!  Thank you.  It is the little things in life that polish the user experience that are often the most exciting.  It takes it from really good to flawless.  Thank you both for your time!  I will try to use the tutorials better first.  Much Thanks!
Photo of Sarah Hughes

Sarah Hughes

  • 454 Points 250 badge 2x thumb
Hi, Skuid Superheroes.

We have had this same problem from day 1. I have the snippet in place, but the links are still opening within the frame instead of the parent. Also, we have a few row actions that are URL redirects that are also opening within the frame, even if you choose parent for the "Open URL in".

Any ideas on what else could be affecting how they open?

Thanks!