How to add custom url parameters to CMS link?

I would like to add custom url parameters to CMS links in editlive, and preserve them in publishing.

E.g. In preview,
http://localhost:9992/Rhythmyx/assembler/render?.…&WT.mc_id=abc&WT.si_n=123
In publish, it becomes
http://www.mycompany.com/products/index.html?WT.mc_id=abc&WT.si_n=123

Is this possible? If not OOB, any suggestions how to do it through customization?

We are using 6.5.2. THANKS

Certainly not OOTB.

I cannot think of any way to do this with CMS links, although it might be possible with inline templates.

Are rthe custom params depend on any of the Rhythmyx objects (Item, Template, Content type etc…) or are they just constants? If they are constant, can you do it on the delivery side through some javascript?

They are constants. Imagine, you have a big body of marketing text, and the business requirements may change from page to page about what the link texts should be, and which ones we are interested in appending WebTrends tags.

So using javascript may work, but may not be very user-friendly. Inline templates may preclude choosing arbitrary link texts.

For now, we are hard coding the URL in EditLive, but that seems to defeat the usefulness of linking items logically in CMS.

I was thinking writing a custom parser that run at publishing time to rebuild the URL. The params of interest can be set as attributes in the Editlive. Don’t know if this is possible or where to begin. Depending on the complexity, may not even be worth doing…

I’ve not done exactly what you’re trying to do but on one implementation we extended our ‘External Link’ content type to contain the following fields:

  • External URL (existing field)
  • End of URL parameters/anchor (new field)

We also added a slot for when we want to link to CMS (and not external) content (which allows the snTitleLink snippet of all page generating content types).

Within Ephox if I want to link to a CMS item I just use the normal inline template functionality, but if I wanted to link to a CMS item with a named anchor, or perhaps in your case with some extra parameters I would create an External Link content item, leave the External URL field blank, add my custom parameters to the field in the External Link type (e.g., ‘#newsHeadlines’), add the CMS item to the slot and then add this snippet to link to the content item from my Ephox field.

Now this does mean there’s an extra content item and an additional level of indirection going on, but if you’ve only got a small number of these kind of scenarios going on then it may work. Now if you’re wanting to add parameters to URL’s all over the place, then I guess some further investigation into your pre-publishing parser sounds like an idea.

This is just an idea, not sure about practical implications.
Add your parameters to the link at the end as #yourparamslist (if possible encoded).
Modify the location scheme generator to extract these params and add them as url params if exists.