Adding additional tabs

Applies to 6.7 (not tested on other versions)

After all the standard disclaimers (not supported, will probably get over written on an upgrade, not responsible for what happens, etc) you can add tabs (Ie where Content Explorer, Admin, tabs show up) in the following manner:

Edit tabs.tag in [I]AppServer\server\rx\deploy\rxapp.ear\rxapp.war\WEB-INF ags\banner[/I]

Add something like the following before the closing root tag:


< jsp:directive.tag import="com.percussion.server.IPSRequestContext"/>
< jsp:directive.tag import="java.util.List"/>
< jsp:scriptlet>
	List userRoles = ((IPSRequestContext) request.getAttribute("RX_REQUEST_CONTEXT")).getSubjectRoles();
	if ((userRoles.contains("Web_Admin") || userRoles.contains("Admin"))){
< /jsp:scriptlet>

< script type="text/Javascript">
var tabPanel = document.getElementById('rxTabPanel');
var tabHtml = tabPanel.innerHTML;
tabHtml += '< li>< a href="/user/pages/mytab.jsp" target="_parent">< span>New TAB!< /span>< /a>< /li>';
tabPanel.innerHTML = tabHtml;
< /script>

< jsp:scriptlet>
	}
< /jsp:scriptlet>


Notes:
[ul]
[li]Requires Javascript to be enabled on the browser (Not an issue b/c you can’t login to RX (choosing a community) without Javascript anyway)[/li][li]Don’t need to do the check for the roles, just showing how it would be possible to display certain tabs based on roles[/li][li]I’ve added a space after the < in the code section because otherwise the code tag doesn’t render the code properly (you will most likely need to remove those spaces before it works properly)[/li][li]Of course you can add additional tabs by adding additional list items in the Javascript, but do note that the table width on the parent is set to 500 px so you will get a wrapping effect if you get too carried away[/li][li]We are using 6.7, YMMV on the older / newer releases of Rhythmyx[/li][li]That file is called both by content explorer and the publishing and workflow tabs, so it appears to be an ideal place to…modify…the code. Feel free to comment on how much this is a hack and this isn’t the appropriate place to do it etc, etc…[/li][/ul]