Processing MODX template variable

211 views Asked by At

I have a TV called previewImage. Usually, it contains a static string. For some dynamic pages, the TV value is a tag [[getPreviewImage]] which returns dynamically an image file name.

I am using [[*previewImage]] as an input for another snippet in the template that generates a responsive IMG element. It works fine when the TV is a static string.

But if TV contains a snippet tag, it won't be processed before I am using it as a parameter. I tried also to use it in the form [[!*previewImage]] without luck.

How can I pre-process TV? I was able to make a workaround but what is the recommended way?

0

There are 0 answers