Trouble with $rx.generate.location

I have created my own Context and some location schemes for generating my pages. Those work fine when it comes to generating the pages.

But then when I try to use $rx.generate.location to link to these pages, it is using the Site Folder Assembly context that came with rff.

In other words, Rhythmyx generates this page:
http://www-xyz.com/products/connections/dev/industry_toc_720.html

which is what I want. But then when I use $rx.location.generate($sys.assemblyItem) in a snippet to link to that page, I get this URL:
http://www-xyz.com/Connections/Landing/item745.html

Connections is my site name, and Landing is the directory that the item is in. That looks like it was generated from the rff stuff.

What can I do to generate the right link?

Thanks

P.S.

I worked on this a little more and got one step closer. I changed the Url value in Content List so that sys_assembly_context=303 where 303 is the context I am using. now my Url looks like this:

http://www-xyz.com/industry_toc_720.html

It is getting the url from my Location Scheme, but it is not including the Site root folders. I guess that must be why you have to create a separate Assembly Context, so that you can code those in…

April,

It is getting the url from my Location Scheme, but it is not including the Site root folders. I guess that must be why you have to create a separate Assembly Context, so that you can code those in…

That’s correct. In most cases, the path to the location where the HTML page will be published is slightly different from the path used in the URL to link between the pages. Therefore you need two Contexts, one to define the location where the output HTML files will be published, the other to define the links between the published content.

For more details, in the Rhythmyx Implementation Guide, see “Defining Contexts and Location Schemes” on p. 306.

RLJII

Could you explain or provide an example why we need two contexts? In our environment we only use ONE context “Site_Folder_Assembly” and NOT using “Publish” at all? so far no problems. anything wrong with using the same one Context for both Delivery & Assembly?

[QUOTE=rljohnson;6144]
… In most cases, the path to the location where the HTML page will be published is slightly different from the path used in the URL to link between the pages. Therefore you need two Contexts, one to define the location where the output HTML files will be published, the other to define the links between the published content.
RLJII[/QUOTE]

Thanks, Hua

Hua,
An assembly context is what controls the generation of links, whereas a publish context controls where files go. In many implementations, there will be no difference between to the two - e.g. /folder1/folder2/mypage.html is both the delivery location and what the href would be. However, there are situations where you might want to generate a full URL, prefix the URL with something… whatever the case may me. Having two contexts gives one that flexibility.

Duane