set $rxs_navbase to null

Is there a way to specify a $rxs_navbase value as null or empty string? Right now it errors saying I need to specify a value.

We want to use $rxs_navbase to specify the location of our assets for preview and publishing. However when publishing we want the value to be null since we want the assets path to start at the root directory.

Ex) For publishing we want this code
<link rel=“Shortcut Icon” href="$rxs_navbase/favicon.ico">
<link rel=“stylesheet” type=“text/css” media=“screen” href="$rxs_navbase/css/screen.css">
<script type=“text/javascript” src="$rxs_navbase/js/main-js.js"></script>

to render when publishing as:
<link rel=“Shortcut Icon” href="/favicon.ico">
<link rel=“stylesheet” type=“text/css” media=“screen” href="/css/screen.css">
<script type=“text/javascript” src="/js/main-js.js"></script>

Thanks,
John

John,

I solved this issue with a little bit of velocity code. In your global template, check the value of the “context” or sys_context parameter. You can make a binding or declare a variable directly in the template. In short you code try something like this:

#set( $contx = $tools.list.get($sys.params.get(‘sys_context’), 0) )
#if( $contx == “1” )##
#set($rxs_navbase = “”)##
#end##

where “1” is the context for “publishing”.

~Ryan