What’s the syntax to generate publish location within a template?
E.g. $rx.location.generate($sys.assemblyItem)
However, I would like to set the call to always use publish context, even in preview.
Not sure if this is supported, because I don’t see such method in the javadoc for PSLocationUtils.
Apologies for bringing up an old thread, but this is exactly what I’m trying to do, and it doesn’t seem to be working. I’m hoping I’m missing something simple.
In version 6.5.2, in my template, I have the following:
With those lines, $path ends up containing an empty string. If I take out the setParameterValue line, then $path contains the Preview context location. I’ve also tried doing this with the clone created in a Binding instead with the same result. I do have a location scheme defined for the content type with the template listed above.
Am I missing a step here? Is there a good way to find out what’s going wrong with the call to $rx.location.generate?
If this is explained somewhere in the PDF documentation or help files or other documentation, feel free to just point me at that. I’m just not even sure what to look up to guide me further. Thanks.
Thanks. Yes, the location schemes are set up under the Publish(1) context. I could try creating a different context I suppose and using that, but all my location schemes are currently set up under that same context, so I’d rather not have to move things unless absolutely necessary.
If the correct context is used in the contentlists, and the location schemes are correct, and yet you still get EMPTY $path, then you should be getting publishing errors, because that’s the path that the publishing engine uses to publish. So, are you getting publishing errors?