We have a content type for External url content items. This content type has the url field, that has the external website address like http://www.cnn.com
Now in our article content type, we have a WYSIWYG Edit live field. We would like to hyperlink a piece of text, click on Rhythmyx Inline Link, and select the url content item. All this works fine. But the problem is that when the page gets published, click on the hyperlink simply takes to the default page for the content item. It does not gets resolved to the actual external url.
How should we resolve this? I think this is a very common requirement to have the users hyperlink a link text to a url content item.
thanks
Manvinder
Mavinder, I would think that it would be more common for people to use the standard linking within the edit live field to link to an external url. However, to do what you are suggesting, the URL content item would have to be already built with the content of the link, including the link text, then you would use the inline variant button to place the rendered snippit inside the edit live content.
Here’s an easy way to visualize this:
Inline Link --> Links to a content item.
Inline Image --> Displays an inline image.
Inline Variant --> Displays the result of a content item template.
In actuality, all 3 of these are simply different names for the same background process, but the concepts that drive each inline slot are different.
Anyway, your template for the External Link content type should be something like this:
<html><body><a href="#displayfield('url')">#field('text')</a></body></html>
And, instead of “hyperlinking a piece of text, click on Rhythmyx Inline Link, and select the url content item,” now, you’ll place the cursor where you want the link to appear, click on “Rhythmyx Inline Variant” and select the url content item. The difference is that no original text was hyperlinked, only the URL’s template output was displayed.
Looks like I was mistaken here.
For inline links and inline images, at least on my copy of 6.7, the template that you link to should be the one that you need the url to point to… i.e. inine image needs to point to the binary template for the image, and the inline link needs to point to the page template for the page to link to.
The inline link was quite tricky for me to set up because I had to set up my templates as Snippets, then convert them to page templates after I had associated them to the inline slot… The content type/template selector inside the slot editor would not allow me to select page templates.
The real answer to your question is that the location scheme for the template that you link to has to resolve to http://www.cnn.com… So, your External Link content type needs to have a page template with publishwhen set to “Never” and a location scheme set up in your “Assembly Linking Context” (or whatever it’s called) that outputs the value of the url field.
What I said before should work, but only in the “Rhythmyx Inline Template” slot… which may be disabled by default in 6.7, if i am not mistaken, again.