Syntax for using a variable in the pblock include statement | Community
Skip to main content
jx62030937
New Participant
Aug 14, 2018 5:17 PM UTC
Solved

Syntax for using a variable in the pblock include statement

Hi, I'm trying to see if there is a way to include a view name of the personalization block is constructed instead of explicit

Specifically:

  • I have 3 personalization blocks with their internal names as 1234_p1, 1234_p2, and 1234_p3
  • In the delivery template, I defined a variable "var id = '1234'"
  • What's the correct syntax, if allowed, for the include statement. e.g., <%@ include view=''' + id + '_p1' %>

Thanks!

Jim

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
vraghav
vraghavAccepted solution
Employee
Aug 19, 2018 4:40 PM UTC

Hi jx62030937,

This is not possible to achieve in Campaign delivery. When the delivery is being analyzed all personalization blocks must be known.

Using a dynamic setup like yours it will never work with the current product design.

There is a non-efficient way to try this which is not scalable and also can cause unnecessary MTA processing delay. The solution is to use a lot of if,else statements which can cater to each requirement of yours.

Regards,
Vipul

CC Gaurang Mathur , can you please mark this thread duplicate of Include personalization block with a dynamic name

1 reply

vraghav
vraghavAccepted solution
Employee
Aug 19, 2018 4:40 PM UTC

Hi jx62030937,

This is not possible to achieve in Campaign delivery. When the delivery is being analyzed all personalization blocks must be known.

Using a dynamic setup like yours it will never work with the current product design.

There is a non-efficient way to try this which is not scalable and also can cause unnecessary MTA processing delay. The solution is to use a lot of if,else statements which can cater to each requirement of yours.

Regards,
Vipul

CC Gaurang Mathur , can you please mark this thread duplicate of Include personalization block with a dynamic name

Translate