Variable replacement inside components
Hello,
I was looking to see if any one had any recommended approaches for a solution we are trying to implement.
We are looking to use variable replacement inside AEM. The variable replacement would be from within authorable components. For example if I wanted to use the RTE to replace {institution} with the institution name. This would not be a one time replacement. Essentially the variable needs to remain whenever they are in authoring but when they are on publish they would need to see the replaced variable. Otherwise I could just trigger an event on the component to search the text and replace the variable on the fly but since the variable needs to remain this is where I am struggling. I know I can use the i18N to do variable replacement but I don't think that would work for an author inside the RTE component (or any component that I am writing text in).
We are attempting to do this as we have multiple site which essentially have the exact same content with a different skin but we would like to be able to replace site names and other variables on the fly to eliminate having to make authoring changes to the live copy.
Any ideas would be greatly appreciated.
Thanks!
Roger