tag of the page component to ensure HTML is loaded. // function gradOnloadHandleCurrentAppAwareLinks() { $(document).ready(function() { $(".grad-current-app-aware").click(function(e) { e.preventDefault(); var app_id = sessionStorage.getItem("grad_current_app_id"); //console.log('app_id: ' + app_id); var link = $(this).attr("href"); var target = $(this).attr("target"); //console.log('OLD LINK: ' + link); if (app_id !== undefined && app_id !== null && app_id != '') { link = link + (link.indexOf('?') >= 0 ? '&' : '?'); // Note that app_id is a custom param we created because of limitations of Slate's app selector. // Slate usually relies on the 'built-in' 'person' parameter value existence before deciding which // application data to load (instead of loading first rank app). So, that's why we set app_id value // to the 'person' parameter. Keep this in mind when working with portals, forms, and other Slate pages. link = link + 'person=' + app_id; } //console.log('NEW LINK: ' + link); window.open(link, target); }); }); } /*]]>*/