Forcing the URL of standalone infocenter to show full path to topic [message #885659] |
Wed, 13 June 2012 08:07  |
Eclipse User |
|
|
|
I have successfully deployed a standalone Infocenter in a WAR file on Tomcat - this will be used to serve documentation for internal and external users. So far everything has gone exactly as I hoped, but is not yet fully live.
However, there is one slight niggle. At the moment (and this is the same on the Eclipse doc site) the real URL to the actual topic page is always masked like this in the address bar:
help.eclipse.org/indigo/index.jsp
Is there anyway to force it to show the full topic path like this:
help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/guide/ua.htm
or even:
help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fua.htm
The reason being is that we would prefer users to be able to just copy the URL to a specific topic if they need to, rather than have to resort to browser options like open in new tab or copy URL location.
I cannot find anything about this in any options or config file, so I suspect it is something that is hard coded into the JSP backend (probably in org.eclipse.help.base_3.5.2.v201009090800.jar)..
If any one has any bright ideas, I'd be glad to hear them.
|
|
|
|
|
Re: Forcing the URL of standalone infocenter to show full path to topic [message #886763 is a reply to message #886137] |
Fri, 15 June 2012 11:37   |
Eclipse User |
|
|
|
Leona: Yes, you're right, it is a frameset, so that's the reason No hope of working round that unless we re-hack the whole thing. It's in org.eclipse.help.webapp\advanced\index.jsp:
<frameset id="indexFrameset" onload="onloadHandler()" rows="<%="0".equals(data.getBannerHeight())?"":data.getBannerHeight()+","%>24,*<%=data.getFooterRowText()%>" frameborder="0" framespacing="0" border=0 spacing=0>
<%
if(!("0".equals(data.getBannerHeight()))){
%>
<frame name="BannerFrame" title="<%=ServletResources.getString("Banner", request)%>" src='<%=data.getBannerURL()%>' tabIndex="3" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
<%
}
%>
<frame name="HelpToolbarFrame" title="<%=ServletResources.getString("ignore", "HelpToolbarFrame", request)%>" src='<%="advanced/helpToolbar.jsp"+UrlUtil.htmlEncode(data.getQuery())%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
<frame name="HelpFrame" title="<%=ServletResources.getString("ignore", "HelpFrame", request)%>" src='<%="advanced/help.jsp"+UrlUtil.htmlEncode(data.getQuery())%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" >
<%
if(!("0".equals(data.getFooterHeight()))){
%>
<frame name="FooterFrame" title="<%=ServletResources.getString("Footer", request)%>" src='<%=data.getFooterURL()%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
<%
}
%>
</frameset>
|
|
|
Re: Forcing the URL of standalone infocenter to show full path to topic [message #987125 is a reply to message #886763] |
Fri, 23 November 2012 11:09  |
Eclipse User |
|
|
|
Since infocenter uses an old fashioned frameset, there is no easy way to reflect the topic url in the address bar, but what you can do is add the topic URL as a link in the topic frame itself using a bit of javascript like this:
<script type="text/javascript" xml:space="preserve">
if (document.URL.indexOf('?') == -1) {
topic_url = document.location.toString();
} else {
topic_url = document.URL.substring(0, document.URL.indexOf('?'));
}
document.write('<a href="' + topic_url + '" shape="rect">' + topic_url + '</a>');
</script>
This makes it much easier for the reader to see and copy the real topic URL.
|
|
|
Powered by
FUDForum. Page generated in 0.03882 seconds