Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
I have followed the directions in the Windchill Customization guide and even searched on the old exploder. I have not found a solution yet to this issue. I have tried changing the justification of the table and text and nothing seems to work. Any ideas?
Solved! Go to Solution.
Wayne,
Do you mind sharing the contents of your codebase/netmarkets/jsp/util/banner.txt file?
My contents are below. Some key characteristics of mine are float:left and margin:2px 170px and z-index:1000.
<style>
#bannerID{
font-size:10px;
cursor:default;
float:left;
clear:both;
position:absolute;
margin:2px 170px;
padding:3px;
top:0px;
z-index:1000;
color: #ffff00;
}</style>
<span id="bannerID">
<!-- Banner begins here -->
Windchill 10.2 Training System Production Data From: 06-NOV-2014
<!-- Banner ends here -->
</span><script type="text/javascript">
//START--The tooltip for the top banner
Ext.onReady(function(){
Ext.QuickTips.init();
new Ext.ToolTip({
target: 'bannerID',
html: '10.2 M020 Training (06-NOV-2014)'
});
});
//END--The tooltip for the top banner
</script>
Wayne,
Do you mind sharing the contents of your codebase/netmarkets/jsp/util/banner.txt file?
My contents are below. Some key characteristics of mine are float:left and margin:2px 170px and z-index:1000.
<style>
#bannerID{
font-size:10px;
cursor:default;
float:left;
clear:both;
position:absolute;
margin:2px 170px;
padding:3px;
top:0px;
z-index:1000;
color: #ffff00;
}</style>
<span id="bannerID">
<!-- Banner begins here -->
Windchill 10.2 Training System Production Data From: 06-NOV-2014
<!-- Banner ends here -->
</span><script type="text/javascript">
//START--The tooltip for the top banner
Ext.onReady(function(){
Ext.QuickTips.init();
new Ext.ToolTip({
target: 'bannerID',
html: '10.2 M020 Training (06-NOV-2014)'
});
});
//END--The tooltip for the top banner
</script>
Sure...
<style type="text/css">
.bannertable {border: 2; background: #E7E8E0; text-align: center; width:
100%;}
.bannerfont {color: #BB0000; font-weight: bold; font-size: 1em;}
</style>
<TABLE class="bannertable" cellpadding=0 cellspacing=5>
<TR>
<TD>
<FONT class="bannerfont">
<center>
<table border=0>
<tr bgcolor=white>
<td width=800>
<font color=red size=+1>
<center>
</center>
</font>
</td>
</tr>
</table>
</center>
</FONT>
</TD>
</TR>
</TABLE>
Your code works on my system. Must have something to do with the table. I did leave off the tooltip part of the code. What does that do? Also how did you get the text with the line numbers?
Wayne,
I'm glad you found the code useful. Some of the CSS I pointed out are the key characteristics for placement of the banner text within the webpage. If this solves your question, can you please mark that post as the correct answer?
The tooltip section would display a tooltip as you mouseover the section of text in the banner area.
To get the effect of line numbers and color-coded syntax, you must switch to "Advanced Mode" while you're replying (or posting an OP). That link is in the top-right corner of the section where you're typing. After entering advanced mode, you get a few more options. One of which is called "syntax highlighting". I chose XML. There are other options available too, such as Java and SQL.
Hi Wayne/Ben,
You can try below steps:
1. Update <Windchill_Home>\codebase\netmarkets\jsp\util\begin_custom.jspf to include following
<%@ include file="/netmarkets/jsp/util/banner_custom.jspf"%>
2. Add following (or whatever you want to display in banner) to <WT_HOME>\codebase\netmarkets\jsp\util\banner.txt
<div class="bannerdiv">
Alert: Windchill server will be shutdown soon for maintenance.<br>
Contact <a href="https://support.ptc.com/appserver/cs/portal" target="_blank">PTC Support</a> for your queries.
</div>
3. Add the following to the Windchill\codebase\netmarkets\themes\windchill\xtheme-windchill.css
.bannerdiv {
color: red; position: absolute; top: 2px; z-index: 1000; left: 200px; font-size: 14px ; font-weight:bold;
background: white;
width: 30%;
}
Note:
Please have a backup of original banner_custom.jspf file before you modify it.
<%@ page import="com.ptc.netmarkets.util.NmUtils, com.ptc.netmarkets.util.beans.NmHelperBean"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%response.setContentType("text/html; charset=UTF-8");%>
<%//
NmHelperBean helper = new NmHelperBean(pageContext);
try {
String filename=NmUtils.getLocaleSpecificFileName(helper.getNmLocaleBean().getLocale(), "/netmarkets/jsp/util/banner", "txt" );
String wthome=wt.util.WTProperties.getLocalProperties().getProperty("wt.home");
wthome+="\\codebase";
String actualfile=wthome+filename;
java.io.File f = new java.io.File(actualfile);
if(f.exists()){
}else{
filename=NmUtils.getLocaleSpecificFileName(java.util.Locale.US, "/netmarkets/jsp/util/banner", "txt" );
}
%>
<jsp:include page="<%=filename%>" flush="true"/>
<%
}
catch (Throwable t){
helper.getNmErrorBean().setThrowable(t);
%><jsp:include page="/netmarkets/jsp/util/error.jsp" flush="true"/><%//
helper.getNmErrorBean().setThrowable(null);
}
%><%@ page contentType="text/html; charset=UTF-8"
%><%response.setContentType("text/html; charset=UTF-8");%>