Thursday, May 23, 2013

Firebug One-line'r to go from psp to psc

I perform a lot of prototyping in the Firebug console. Since most of this prototyping refers to the TargetContent frame (component area), not the header and main window, I find it easier to change out the URL to just the "psc" core content URL, eliminating the header frame. When navigating from a homepage, this URL change is a matter of just replacing the /psp/ in the browser's URL with /psc/. When navigating from some other transaction, however, it is not so easy. The URL in the browser is for the first component opened with that browser which may or may not be the current component displayed on the screen. Here is a quick one-liner that I use in the Firebug console to remove all of the PeopleSoft "chrome", leaving just the transaction area:

window.location.href = frames["TargetContent"].strCurrUrl.replace("/psp/", "/psc/")

Better yet, drag the "bookmarklet" link onto your bookmarks toolbar to add this one liner to your browser favorites. Then when you want remove the PeopleSoft header (and left menu on older versions of PeopleTools), just click the bookmark/favorite.

Chromeless PS Bookmarklet


Unknown said...

Hi Jim,

Firstly, just wanted to thank you for all the support you provide on this stuff. Its a huge help.

My question concerns changing the "psp" to "psc" in the URL to display only the component. We have a component that is a login/registration page for our new university applicants, and would like to direct them to this component without the portal wrapper.

From your other posts, I understand that changing the URL will work only if the database is the same, which in this case it is not. For consistency, however, we would like to keep the portal site name, and not have them go directly to the Campus Solutions server.

My question is this: Is there a way to have only the component show AND keep the portal site name?

Thanks again for your help

Jim Marion said...

@Rauhan, yes, using CREF templates you can hide the portal header.

When you say you don't want to change sites in the URL, is that because you don't want the site name to be visible in the address bar? The reason I ask is because the /psc/ URL is exactly what the browser requests even when you use /psp/. /psp/ contains an iframe (or frameset on older tools releases) so the browser address shows portal's URL, but the iframe (URL visible through chrome tools, firebug, etc) is really the same URL as the /psc/.

Unknown said...

Hi Jim,

Thanks for getting back to me.

We have a guest web profile set up with public access for this component. We realize that we could
set up our CS server with one too, but we would just like to keep everything inside the portal so
as not to confuse our new users.

For this component specifically we would like just the component alone.

Our portal sitename goes something like this:

The component works with psp only, not psc.Otherwise we get an authorization error

To get the component without the portal wrapper, we have to use our CS URL

With CREF templates, I can get rid of all navigation (which might be a good alternative) but not the portal wrapper altogether.

Thank you

Unknown said...

Hi Rauhan,

Is this fixed?
Can you please share the solution?