SYS_CONTEXT variable in Preview / Publish

Hi,

I have a snippet template used in the EditLive control that either renders as an <img> tag in preview or as an SSI include directive when a page is published…so I essentially have the following code in the template:


<span class="ewep_inlinesnippet">
   #if($rx.asmhelper.getSingleParamValue($sys.params, "sys_context")=="0") 
      #if($doc!="")		   
         $doc
      #end
   #else
         #if($include!="")		   
	$include 
         #end
   #end
</span>

When I view the snippet with either sys_context=0 or sys_context=1 the correct bit of html is rendered, but when I add the snippet to the page vairant and switch between sys_context=0 or sys_context=1 I always get the preview i.e. sys_context variable returned as 0 ). When I change the assembler url from /Rhythmyx/assembler/render? to /Rhythmyx/assembler/debug? the actual value of sys_context is 1 but the page displays as if it were preview and the value of sys_context printed out on the actual page is 0.

Strangely this works on our test server, so perhaps I’ve missed something…but this has been copied over from our test environment.

Cheers
Jason

No worries…sorted