if sys.pub_path == a specific path?

I have a section of our site that uses a different url from the rest of the site. After conferencing with PSO he’s suggested I implement a IF statement in my site folder assembly location scheme that checks the value of sys.pub_path and then assign the correct URL.

Below is what I have but it seems to fail.


if ($sys.crossSiteLink)
	if ($sys.pub_path == '/Standards/PSAB')
		{$prefix = 'http://rmx.psab-ccsp.ca';}
	else
		{$prefix = $sys.site.url;}
else
	if ($sys.pub_path == '/Standards/PSAB')
		{$prefix = 'http://rmx.psab-ccsp.ca';}
	else
		 {$prefix = $sys.variables.rxs_urlroot;}

$prefix + $sys.pub_path.toLowerCase().replace(' ','-') + $sys.template.prefix + 'item' + $sys.item.getProperty('rx:sys_contentid').String +
$rx.location.getFirstDefined($sys.item,'rx:item_file_attachment_ext,rx:img1_ext,rx:sys_suffix', '.html') 

I’ve also tried if ($sys.pub_path == ‘//Sites/CICA.ca/standards/psab’) and I’ve even tried both with the / flipped around.

Does anyone have any ideas on this?

Shane

You need to use .contains() or .equals() for this, not ==