We have a snippet template that creates a link to a content item using the title as the link text. The source for that template is:
<meta content="Percussion Rhythmyx" name="generator"/>
<body style="background-image:none; background-color:#ffffff;">
where $pagelink is defined in the bindings as
This template is set up to be used as an inline template, and works great as listed above.
We now have a request from the content editors to be able to do a similar link, but using text that they specify instead of using the content item title. They would like the text to be different in different places where the snippet is used inline.
What is the recommended way to accomplish this goal? Is there an analogy to the link we already have working? Or do we need to tackle this some other way entirely?
One other note that may be relevant; we are doing this through the sys_inline_variant rather than sys_inline_link because the content items that are being linked to are database templates rather than page templates, and the documentation indicates that only page templates are available for use with sys_inline_link.
I would be curious as to the official way to do this as well…I don’t have an unofficial way, so I suppose either way would be beneficial to know…
Thanks. Even without a solution, it’s good to know we aren’t the only ones that would want to know how to do this. Hopefully someone will come along that does have a suggestion of how to accomplish this, and help all of us out.
In trying to look into this further, I was curious how the sys_inline_link would handle changing the text of the link within the EditLive window.
This does not work when creating the link through sys_inline_variant; when you save the change, it reverts to the link text defined in the snippet template. Presumably this behavior is because inline variants are meant to be inserted as is and maintained by Rhythmyx rather than edited inline. But I was curious whether it acted differently using sys_inline_link.
The result of this experiment was interesting. It did, in fact, work. When you insert a link using sys_inline_link, it puts a blank character in as the link text. You can then edit that to whatever text you want in the code tab of the EditLive control, and it preserves it when the content item is saved.
The problem with that is that sys_inline_link will only accept page templates, and we are using a database template. Is there a way to add database templates to the sys_inline_link allowed templates? Would that achieve the goal listed in the orginal post here?