The Now Platform® Washington DC release is live. Watch now!
‎11-15-2016 06:59 AM
News scroll widget, the records which scroll is in blue color. how to make them in red?
Solved! Go to Solution.
‎11-15-2016 08:48 AM
I am not sure you can. There's a kb_template.xml there that is not accessible to us according to Who is hiding the Jelly?
You can create your own new widget - rename the current one to render_gadget_news_old and create a new one.
I took the example from here http://wiki.servicenow.com/index.php?title=Adding_a_Scrolling_News_Panel#Scrollable_Areas and changed it to query the kb_knowledge table.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g2:evaluate var="jvar_inc">
var kb = new GlideRecord('kb_knowledge');
kb.addActiveQuery();
kb.addQuery('topic','News');
kb.query();
</g2:evaluate>
<!--<g2:scrollable_area height="150px"> -->
<table border="0" cellspacing="2" cellpadding="2" width="100%">
<j2:while test="$[kb.next()]">
<j2:set var="jvar_inc_link" value="kb_knowledge.do?sys_id=$[kb.sys_id]"/>
<j2:set var="jvar_kb_list_link" value="kb_knowledge_list.do?sysparm_query=active=true"/>
<tr>
<td>
<a href="$[jvar_kb_knowledge_link]">
<span style="padding-right:10px;"><IMG SRC="images/icons/incidents.gifx"/></span>
</a>
<a href="$[jvar_kb_link]" class="linked" style="padding-right:10px;"><font color="red"><b>$[kb.number]</b></font></a>
</td>
<td><font color="red">$[kb.short_description]</font></td>
</tr>
</j2:while>
<tr>
</tr>
</table>
<!-- </g2:scrollable_area> -->
</j:jelly>
harel
‎11-15-2016 08:48 AM
I am not sure you can. There's a kb_template.xml there that is not accessible to us according to Who is hiding the Jelly?
You can create your own new widget - rename the current one to render_gadget_news_old and create a new one.
I took the example from here http://wiki.servicenow.com/index.php?title=Adding_a_Scrolling_News_Panel#Scrollable_Areas and changed it to query the kb_knowledge table.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g2:evaluate var="jvar_inc">
var kb = new GlideRecord('kb_knowledge');
kb.addActiveQuery();
kb.addQuery('topic','News');
kb.query();
</g2:evaluate>
<!--<g2:scrollable_area height="150px"> -->
<table border="0" cellspacing="2" cellpadding="2" width="100%">
<j2:while test="$[kb.next()]">
<j2:set var="jvar_inc_link" value="kb_knowledge.do?sys_id=$[kb.sys_id]"/>
<j2:set var="jvar_kb_list_link" value="kb_knowledge_list.do?sysparm_query=active=true"/>
<tr>
<td>
<a href="$[jvar_kb_knowledge_link]">
<span style="padding-right:10px;"><IMG SRC="images/icons/incidents.gifx"/></span>
</a>
<a href="$[jvar_kb_link]" class="linked" style="padding-right:10px;"><font color="red"><b>$[kb.number]</b></font></a>
</td>
<td><font color="red">$[kb.short_description]</font></td>
</tr>
</j2:while>
<tr>
</tr>
</table>
<!-- </g2:scrollable_area> -->
</j:jelly>
harel