2

I'm using GTL (Guide Template Language) on the body of an email where I want to show some images dynamically and works well. But, to let the email more "clean" I want to copy that GTL code on a different ContentArea and then call that content using AMPscript.

I tried with ContentAreaByName and TreatAsContent but on both cases doesn't work, nothing is displayed.

So my question is: Is possible use the GTL on a ContentArea or that code block have to be at the same place?

  • Any solutions for this? I've tried the ContentBlockByKey but get a data source not found error. – Noor Alam Aug 7 '18 at 15:21
0

Yes, the content block can be pulled in by using GTL.

List of AMPscript functions that should be available within the Guide and follows the same parameters for usage.

Here is the structure:

{{=function(parameter)}}

In your scenario you should be pulling in content block using the function below:

{{=ContentBlockByKey("your_content_block_key")}}
  • Brad, I don't think this solution works. The use case is if you have GTL content in a content block how can it be brought into a email. I get this error "An error occurred when attempting to evaluate a ContentBlockByKey function call" – Noor Alam Aug 7 '18 at 15:20
  • @NoorAlam this was tested and it works for me. if you have a GTL within a content block then you'd need to wrap it with TreatAsContent function which will execute the ampscript – Brad Sapkota Aug 8 '18 at 1:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.