0

I am having a weird, serious issue. I have an email with basic content. See screenshot - basically, the intent is to wrap if/endif around these content blocks to show the appropriate block. I've done this TONS of times before. Notice "Elevate", "HDHP", etc.? These will be wrapped in if/endif AMPScript.

enter image description here

However, when I do this: enter image description here

And then save the email, ALL the if/endif logic gets pushed to the top, like this: enter image description here

My expectation is that when putting AMPScript in certain areas of the email, that AMPScript should STAY in that location after saving. What's going on???

  • Yeah, it's supposed to stay put. I would create a new email from scratch, and then copy/paste the HTML in it. Assuming that the issue won't happen in the newly created email. If it does, however, then I would open a help ticket. – Harley Oct 31 '19 at 19:50
  • @Harley yeah, I did that, same issue even on an email built from scratch (no template). Just straight copy pasted HTML. I've NEVER had this problem before. Weird. Support ticket opened. – Mike Marks Oct 31 '19 at 20:10
  • are you using a free form block? – EazyE Oct 31 '19 at 20:28
  • @EazyE HTML block – Mike Marks Nov 1 '19 at 13:29
1

Try wrapping each of your Ampscript in HTML comments. For example, replacing:

%%[ your ampscript ]%%

with

<!-- %%[ your ampscript ]%% -->

Generally this keeps it in place better. The SFMC WYSIWYG editor can do some strange stuff at times. It's not clear where you are doing the editing here, but in my experience using the 'free form' content block type tends to do the least amount of manipulation, whereas using Content Builder for CloudPages seems to add/move stuff around quite a bit.

| improve this answer | |

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.