0

I'm creating a custom template with static content created for other templates. I'm currently trying to use a specific html only based content but would like to exclude an object.

Wondering what would be the best way to do this with out creating another content that is like the current one.

1 Answer 1

1

You can conditionally hide and show content with AMPScript.

%%[
var @lang
set @lang = AttributeValue("language")
]%%

<-- some other HTML -->

%%[ if @lang == "es" and @lang != "pt" then ]%%

<h1>Hola</h1>

%%[ elseif @lang == "fr" then ]%%

<h1>Bonjour</h1>

%%[ elseif @lang == "au" then ]%%

<h1>G'day!</h1>

%%[ else ]%%

<h1>Hello</h1>

%%[ endif ]%%

Reference: AMPScript Syntax Guide

2
  • 1
    Sorry for the edit @Adam, I couldn't help myself. Hey, it's Friday. Commented Aug 19, 2016 at 1:45
  • LOL. You can edit my answers anytime. Commented Aug 19, 2016 at 1:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .