Using macros in custom table data

Derek McDonald asked on May 4, 2015 06:40


Wondering if it is possible to resolve macros inside a field of a custom table that is a rich test editor. I see there is a button to insert a macro into the field, but when I view the data using a transformation is just shows the macro expression not the value it should resolve to.

Thanks in advance for any assistance in this matter

Recent Answers

Jan Hermann answered on May 4, 2015 13:50


Within a transformation you need to call the MacroResolver.Resolve() method to resolve macros like:

<%# CMS.MacroEngine.MacroResolver.Resolve(Eval("YouField").ToString()) %>

Best regards,
Jan Hermann

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.