Staging Publishing location

Has anyone sucessfully set up a seperate publishing and staging location?

My problem is that the staging site I have added assumes that because items have been assemble in a slot specifying the production site (obviously) that it is a cross site link. So links to items listed in slots are referring to the production server url and not the staging server.

I have tried to create a new context removing the cross site link check but this results in no url being generated at all.

What is your location scheme like?

I recall in another post, you said both the production and staging publishing sites point to the same site folder. In that case, I expect the url path will be relative, e.g. /somefolder/foo.html.

Is your location scheme using absolute address?

Hi Jason

The Production Site and Staging site both use the same Folder Root (//Sites/Intranet)

I have tried several location scheme definitions for the Staging published site:

  1. $rx.cond.choose($sys.crossSiteLink, $, $sys.variables.rxs_urlroot) + $sys.pub_path + $sys.template.prefix + $sys.item.getProperty(“rx:sys_title”).String.replaceAll(’[^\w\d]+’,"_").toLowerCase() + $rx.location.getFirstDefined($sys.item,‘rx:img1_ext,rx:sys_suffix’, ‘.jsp’)

This renders the link for items assembled in slots as a cross site link istead of a link within the staging site.

  1. $sys.variables.rxs_urlroot + $sys.pub_path + $sys.template.prefix + $sys.item.getProperty(“rx:sys_title”).String.replaceAll(’[^\w\d]+’,"_").toLowerCase() + $rx.location.getFirstDefined($sys.item,‘rx:img1_ext,rx:sys_suffix’, ‘.jsp’)

This renders no link at all. The a href tags are null.

  1. $rx.cond.choose($sys.crossSiteLink, $sys.variables.rxs_urlroot, $sys.variables.rxs_urlroot) + $sys.pub_path + $sys.template.prefix + $sys.item.getProperty(“rx:sys_title”).String.replaceAll(’[^\w\d]+’,"_").toLowerCase() + $rx.location.getFirstDefined($sys.item,‘rx:img1_ext,rx:sys_suffix’, ‘.jsp’)

This was an attempt fake the result of $rx.cond.chooses but having the same result however this renders no link at all. The a href tags are null.

The problem seems to be that Rhythmyx has stored the ID of the site associated with the content assembled in the slots. Because the site used for Actively Assembling the slots is the Production Site definition when it comes to Publishing the Staging Site which has a different Site ID to that of the slot items relationship Site ID. So Rhythmyx treats this slot content as being on another site (as you’d expect) and so must treat it as cross site linking.

What I need to be able to do is find a way of instructing Rhythmys to treat the slot assembled content as being on the same site when creating assembly location links.

OK just tried

http://vs007:9992/Intranet’ + $sys.pub_path + $sys.template.prefix + $sys.item.getProperty(“rx:sys_title”).String.replaceAll(’[^\w\d]+’,"_").toLowerCase() + $rx.location.getFirstDefined($sys.item,‘rx:img1_ext,rx:sys_suffix’, ‘.jsp’)

And it worked!

seems that there is no way of setting the string: ‘http://vs007:9992/Intranet’ as a sytem variable, which means in must be hard coded into each location scheme definition for publishing.

Obviously in doing this cross site linking is sacrificed for staging purposes.

What would be useful is the Site definition being able to contain more than one Publishing Root Location and Publisher. i.e. one for staging publishing and another for production publishing.

Hi Andrew,

Besides “//Sites/Intranet” (and I know you have both production and staging sites for it), is there another “site”?

The reason I ask is, all the location schemes you printed use absolute address (start with http://…). If you only have one site folder, why not simply use relative address? Using relative addressing, the location schemes can start with $sys.pub_path + …

If absolute addressing is what you want, then you can define the value of rxs_urlroot to be “http://vs007:9992/Intranet” for the staging site and some other value for the production site.
This way, the publishing variable will be evaluated to the appropriate value depending on your publishing site.

One more option is to define a custom “context”. Out of box, you have Preview, Publish (to define publishing file paths), and Site Folder Assembly (to define href values). Define a custom Site Folder Assembly context and use it exclusively for the contentlists used for staging.

The absolute url is used in staging to stop the cross site linking between staging and live as all slot items are assembled in the production site.

The cross site linking assumes that all slots in staging therefore link back to the production site which, obviously on a staging site is not the case.

This response is just an fyi since it might help others with a similar question, please let me know if you see anything wrong with our approach.

We wanted to accomplish a similar staging process, however all of our production sites are being served behind a cname in apache (i.e. For the temporary staging process we didn’t want to set up cnames for each staging site so the same site would exist behind one domain name (i.e.

We changed our Site Folder Assembly for HTML Pages (301) context to:

$rx.cond.choose($sys.crossSiteLink, $, $rx.cond.choose($sys.variables.rxs_urlroot == "/../", "", $sys.variables.rxs_urlroot)) + $sys.pub_path + $sys.template.prefix + $sys.item.getProperty("filename").String + $rx.location.getFirstDefined($sys.item,'rx:sys_suffix', '.html')

And added a rxs_urlroot publishing variable for each site, /…/ would signify the site should not prepend anything to the url, while any other value would be appended.

When publishing the site for staging the rxs_urlroot variable would be set to:


When publishing the site for production the rxs_urlroot variable would be set to: