Menu icon Foundation
Global variables

I'm still learning so apologies if this is a bit of a stupid question. 

 

I'm trying to create a set of multi branded emails. All will have different branding, but most of them will have similar content with a couple of exceptions.  I've been able to work out how to do the branding and layout but what I'm struggling with is easily reusing content blocks through global variables. I've had to create new projects per brand and then copy and paste the shared content into variables in the index.html page. 

What I'd like to be able to do is have each brands index.html reference a single page containing the global content so that I can make a single update that will be reflected in all brands that share content, but will be overridden in the brands that have their own bespoke content in that section.

Any thoughts on how I might achieve this?

Thanks in advance.

variables

I'm still learning so apologies if this is a bit of a stupid question. 

 

I'm trying to create a set of multi branded emails. All will have different branding, but most of them will have similar content with a couple of exceptions.  I've been able to work out how to do the branding and layout but what I'm struggling with is easily reusing content blocks through global variables. I've had to create new projects per brand and then copy and paste the shared content into variables in the index.html page. 

What I'd like to be able to do is have each brands index.html reference a single page containing the global content so that I can make a single update that will be reflected in all brands that share content, but will be overridden in the brands that have their own bespoke content in that section.

Any thoughts on how I might achieve this?

Thanks in advance.

Corey Schaaf over 3 years ago

I tired to do this with three different brands. My only solution was to create individual sets of variables in the data folder per project. I set them up in a varibles.yml file. 

I'd be interested if anyone else was able to do this. 

Justin over 3 years ago

Thanks Corey,

 

Do you mind elaborating, I've spent hours trying to figure out how to include variables in a variables.yml file. I must be thick or missing something though because whenever I try to follow the instructions I find online it doesn't work. 

If you're feeling generous I'd really appreciate a super dumbed down explanation, I won't be offended.

 

Cheers,

Justin 

Corey Schaaf over 3 years ago

Hey Justin, 

I actually gave a pretty detailed step by step account of how I do this while answering someone question. You can find my approach on this board. 

http://foundation.zurb.com/forum/posts/43584-handlebars-img-src-depending-on-test-or-production