How To: Open a link in the main portal frame
Here is my experience with opening a page framed in the portal with the headers. Depending where the link is or how you are opening it, clicking a custom link in Luminis can have a few undesired outcomes. If the link is in an “inline frame” channel, it will most likely replace the content in that channel. Sometimes they will replace the current browser window. You can use javascript to open a new window and fix these problems but then that defeats the “portal experience”. Some pages in Luminis (My Courses, Self Service, etc) have the ability to open under the portal frame but I was unable to find the name of the frame to target it. So heres how we did it.
If you look at the link to open My Courses, you will see a uportal rendering function is used to open the page into the main frame.
http://your.school.edu/cp/render.UserLayoutRootNode.uP?uP_tparam=utf&utf=/cp/school/schedule
I tried replacing the section after ‘utf=’ with an external web page URL but received errors. It appears that you can only use this function with pages hosted locally on the Luminis machine. To get around this limitation we wrote a jsp redirect page that takes a url parameter for the link you want to open. So the uportal render function properly opens the local page Redirect.jsp in the main frame and then calls the actual page you want using a META refresh.
For example, if you wanted to open a Financial Aid page in the portal frame, you would make a link somewhere in your portal that looks like this:
http://your.school.edu/cp/render.UserLayoutRootNode.uP?uP_tparam=utf&utf=/cp/ipx/wsu/Redirect.jsp%3Fapp%3Dfinaid
(I highly recomend putting any custom jsp pages under the /cp/ipx directory instead of under /site)
Here is what your Redirect.jsp could look like with just that 1 link:
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.net.URL" %>
<%@ page import="java.text.*" %>
<%
String baseURL;
String appPara = request.getParameter("app");
%>
<%if (appPara.equals("finaid")){
baseURL = response.encodeURL("https://your.school.edu/fa/index.html");
}else
baseURL = response.encodeURL("site/redirect_error.html");
%>
<html>
<head> <title> Redirect </title>
<META HTTP-EQUIV=Refresh CONTENT="0; URL=<%= baseURL %>">
</head>
<body>
<h1>
</h1>
</body>
</html>
You can add more ‘else if’ statements to accommodate more links. We have about 35 links currently in our file. When you create the link in your portal, you can just copy the link you used for financial aid and change the name. We have about 35 links currently in our file. We use this file for tracking the links that get clicked on too...but I took that part out of the code to write up as a separate guide. Feel free to ask any questions you have and good luck!

Works -
I tried logging into luminis and then entering this url into the address line for grins (this using Yahoo as an example)
http://mcsquare.messiah.edu/cp/render.UserLayoutRootNode.uP?uP_tparam=utf&utf=http://www.yahoo.com
and it works great.
Then I created a free form HTML Targeted Content and it worked from there as well. I'll try it from a WebProxy channel next.
Thanks for the post !
-Jon
Jonathan Wheat
Founder of the Luminis Developer's Network
LDN, the place for Luminis Developers to hang
Great
Yeah, I went back and tried changing the utf=http://mozilla.org again and it works now. That makes things a million times easier for people. It must have been a problem in Luminis III that was changed for III.1. I know I tried changing that link every way I could to avoid writing the code above :)
Another solution
We were doing this as well, but I didn't like losing the tabs. We noticed that you can create a new tab that is framed, so the functionality was hiding somewhere in there. After poking around a bit we turned up what we needed by hijacking a url parameter and making 2 small XSLT tweaks. We extracted uPortal.jar and edited org/jasig/portal/layout/tab-column/nested-tables/nested-tables.xsl to allow framing pages under the tabs
find:
<xsl:when test="$frm='frame'">
replace with:
<xsl:when test="$frm='frame' or contains($frm, 'http')">
then find:
<xsl:choose>
<xsl:when test="$frameurl = 'http://' or $frameurl = 'https://' or $frameurl = 'ftp://' or $frameurl = 'gopher://' or $frameurl = 'nntp://'">
replace with:
<xsl:choose>
<xsl:when test="contains($frm, 'http')">
<xsl:attribute name="src">
<xsl:value-of select="$frm"/>
</xsl:attribute>
</xsl:when>
<xsl:when test="$frameurl = 'http://' or $frameurl = 'https://' or $frameurl = 'ftp://' or $frameurl = 'gopher://' or $frameurl = 'nntp://'">
This will allow you to use urls like:
http://your.school.edu/cp/render.UserLayoutRootNode.uP?uP_tparam=frm&frm=http://www.yahoo.com
(We are using this in production, Luminis III.2)
Question
I haven't attempted this yet, but when you do this, is there an active tab selected, or are they all inactive ?
-Jon
Jonathan Wheat
Founder of the Luminis Developer's Network
LDN, the place for Luminis Developers to hang
It keeps whatever tab the lin
It keeps whatever tab the link came from as active. This was the desired effect for us.
Just tried it
hmmm... didn't work.
http://mcsquare.messiah.edu/cp/render.UserLayoutRootNode.uP?uP_tparam=frm&frm=http://www.yahoo.com
If you click this the site may be down since I'm still dinking with it.
I'll check my modifications again, although I copied and pasted what you had there.
I had to do this to repack everything it spat out -
jar cvf uPortal.jar campuspipeline org properties groups *.xml *.properties *.conf *.mappings
sound right ? (SIDE TOPIC : what is the META-INF directory for? doesn't like when I try to include this)
Luminis came back up after I copied it into $CP_WEBINF/lib over the one that was there (yes I backed it up first :) so whatever changes were in there aren't causing any 'Technical Difficulties' [ love that message]
-Jon
When I unpack and repack, I u
When I unpack and repack, I use a sub directory and do the following:
unpack:
repack:
That way I know I get everything. Back on the note of the frame mod, XSLT is very twitchy. We had a couple stray linebreaks, everything looked fine, but it was still throwing the error. Try pasting that into some text editor and making sure EVERY strange line break is removed, then put it back in. We are running this in production III.2, so I know it works.
META-INF directory
This is a Java Archive thing - the manifest file must be placed in META-INF. By default, the jar tool creates a manifest for you (called 'MANIFEST.MF') when you create a jar file and puts it in a META-INF directory within the jar. You can use a runtime switch ('m', e.g. jar cmf ...) to tell the jar tool that you want to use your own manifest. If you don't do this it will get upset if you are trying to add your own manifest; you can only have 1 manifest per jar file. See http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/jar.html for more detail.
Michael
Ducks in a row
Ok ... so on my installation I had to edit the actual nested-tables.xsl file on the filesystem, not the one in the uPortal.jar file. Go figure.
As soon as I made those changes to -
\luminis\webapps\luminis\stylesheets\org\jasig\portal\layout\tab-column\nested-tables\nested-tables.xsl
bounced the web server the frame works.
Wierd.
Do you have a Luminis III.2 complete install, or is yours a III.2 upgrade. Wondering if there's a difference.
-Jon
You are right
After checking back in my notes, you are right, that is the file I modified too. Oops...
links in portal frame when clicked from iframe version 4.2.2
I've tried modifying the nested-tables.xsl file at
$CP_ROOT/webapps/luminis/WEB-INF/uPortal/org/jasig/portal/layout/tab-column/nested-tables/nested-tables.xsl
but the second part of the code mentioned in this thread:
<xsl:choose>
<xsl:when test="$frameurl = 'http://' or $frameurl = 'https://' or $frameurl = 'ftp://' or $frameurl = 'gopher://' or $frameurl = 'nntp://'">
no longer exists in version 4. Has anyone found an easy way to do this? What would be really great is if there was a way to automatically reformat the urls in the inline frames to do this. This would allow our content managers to create information on the website and the links would work both on the website and also open in the portal framework when iframed in the portal. We can make it target a new window in both instances, but that causes accessibility issues and it would be nice to keep it in the portal framework.
Try this area as the second area
The second area that you could edit is:
<iframe id="the_iframe" onLoad="calcHeight();" style="border-style:hidden; width:100%;" src="{$frameurl}">
<h2><xsl:value-of select="$FRAME_ALERT"/></h2>
<p><xsl:value-of select="$THIS_DOCUMENT_IS_DESIGNED_TO_BE_VIEWED_USING_THE_FRAMES_FEATURE"/></p>
</iframe>
and change it to:
<xsl:choose>
<xsl:when test="contains($frm, 'http')">
<iframe id="the_iframe" onLoad="calcHeight();" style="border-style:hidden; width:100%;" src="{$frm}">
<h2><xsl:value-of select="$FRAME_ALERT"/></h2>
<p><xsl:value-of select="$THIS_DOCUMENT_IS_DESIGNED_TO_BE_VIEWED_USING_THE_FRAMES_FEATURE"/></p>
</iframe>
</xsl:when>
<xsl:otherwise>
<iframe id="the_iframe" onLoad="calcHeight();" style="border-style:hidden; width:100%;" src="{$frameurl}">
<h2><xsl:value-of select="$FRAME_ALERT"/></h2>
<p><xsl:value-of select="$THIS_DOCUMENT_IS_DESIGNED_TO_BE_VIEWED_USING_THE_FRAMES_FEATURE"/></p>
</iframe>
</xsl:otherwise>
</xsl:choose>
This is only half of the solution. This allows for linking within Luminis to a tab with iframed content.
The second piece, linking to the tabbed content from outside luminis, is something that we are interested in knowing also. Currently the URL requested is not passed beyond the login screen.
Beware. If you implement the above solution and you can link directly to content from another website, you may introduce possible cross scripting vulnerabilities if you don't test the URL being sent in.
Has anyone solved linking to luminis content from another site?
Update: http://www.lumdev.net
Update:
http://www.lumdev.net/node/2812 indicates how to pass information beyond the login screen by using
http://your.portal.domaion.edu/cp/home/displaylogin?goto= followed by a urlencoded URL of the content within Luminis.
if you are using this code I posted earlier:
<xsl:choose>
<xsl:when test="contains($frm, 'http')">
<iframe id="the_iframe" onLoad="calcHeight();" style="border-style:hidden; width:100%;" src="{$frm}">
<h2><xsl:value-of select="$FRAME_ALERT"/></h2>
<p><xsl:value-of select="$THIS_DOCUMENT_IS_DESIGNED_TO_BE_VIEWED_USING_THE_FRAMES_FEATURE"/></p>
</iframe>
</xsl:when>
<xsl:otherwise>
<iframe id="the_iframe" onLoad="calcHeight();" style="border-style:hidden; width:100%;" src="{$frameurl}">
<h2><xsl:value-of select="$FRAME_ALERT"/></h2>
<p><xsl:value-of select="$THIS_DOCUMENT_IS_DESIGNED_TO_BE_VIEWED_USING_THE_FRAMES_FEATURE"/></p>
</iframe>
</xsl:otherwise>
</xsl:choose>
You should change the condition:
<xsl:when test="contains($frm, 'http')">
to:
<xsl:when test="contains($frm, 'http://your.intranet.webserver.edu'>