Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<!-- Let's do a call to the specific navigation menu that we want to use -->
<g:evaluate>
var sectionGR = new GlideRecord('menu_section');
sectionGR.addQuery('sys_id', 'REPACE WITH YOUR SYS ID OF YOUR NAVIGATION MENU');
sectionGR.addQuery('active', 'true');
sectionGR.orderBy('order');
sectionGR.query();
<script type="text/javascript">
$j(document).ready(function() {
document.title = 'Category: ${current.category.getDisplayValue()}, Name: ${current.name.getDisplayValue()}';
});
</script>
<script type="text/javascript">
$j(document).ready(function() {
document.title = 'Topic: ${current.topic.getDisplayValue()},
Category: ${current.category.getDisplayValue()},
Title: ${current.short_description.getDisplayValue()} - KB Number: ${current.number.getDisplayValue()}';
});
</script>
<?xml version="1.0" encoding="utf-8"?>
<j:jelly trim="true" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<!--The following variable and IF statement allow you to have a custom layout when placing blocks during the edit page process -->
<g:set_if var="jvar_dialog" test="${!RP.isDialog()}" true="false" false="true" />
<j:if test="${jvar_dialog=='false'}">
<!-- including the id="${jvar_name} is the only really critical piece to what is below. It allows the layout to work. -->
<div id="${jvar_name}">
<!-- Use the following code to detect whether the browser is IE -->
<g:evaluate var="jvar_is_ie">
try {
var isMSIE = Packages.com.glide.sys.Transaction.get().getRequest().getHeader('user-agent').indexOf("MSIE") > 0 ? true : false;
} catch (e) {
isMSIE = false;
}
isMSIE;
</g:evaluate>
<div class="breadcrumb">
<a href="${current_page.getURLSuffix()}.do">${current_page.getName()}</a>
</div>
<!-- You can also include the page description in the same manor by using the code below -->
<j:if test="${current_page.getDescription.getDisplayValue()!=''}">
<p class="page_description">${current_page.getDescription()}</p>
</j:if>
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div>
<g:evaluate>
var logoutAction = "/logout.do";
var backtrack_path = "";
var tran = GlideTransaction.get();
<!--Do a look-up and find the First Name of the current user -->
<g:evaluate>
var name = gs.getUser().getFirstName()
if(name == ''){
<!--If there is no value for First Name, then query the sys_user table and get the user_name value -->
var usr = new GlideRecord('sys_user');
usr.get(gs.getUserID());
name = usr.user_name.getDisplayValue()
}
if(name == ''){