Developer forum

Forum » Templates » Different page template for page when sending through email marketing

Different page template for page when sending through email marketing

Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

Proably asked and answered before, but can´t find the info. Is it possible to apply a different page template (email) to a page when sending it as an email through email marketing? I don´t want to duplicate content on the solution, so if it´s possible to add a specific email template for a page, that only applies when the page is sent as an email - then that would be perfect.

If so, where can i read more about this?

/Hans


Replies

 
Nicolai Pedersen
Reply

That is not possible.

The best you can do is to use a conditional in your layout template:

if(PageView.IsEmailContext){

//render email template

}else{

//render regular template

}

BR Nicolai

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Ok, thank you

that is what i have done 👍

/Hans

 

You must be logged in to post in the forum