Hi guys. I'm creating an html template in Marketo. For one of my modules there's quite a chunk of css styles that need to go in the <head> section. Is there a way to only show certain <style> blocks based on whether or not a certain module is being used in the template? The extra <style>'s do not need to be shown if I'm not using the module and there's quite a few lines of them so I don't really want them there if I'm not using the corresponding module, if that makes sense?
Solved! Go to Solution.
Not if the styles must be in the <head> - and styles need to be in the <head> to work across mail clients (where they are supported at all).
For content other than styles, you could include a Velocity token in the module that sets a variable. And then in another Velocity token, check to see if that variable is set and output the content if so. But for this to work, the output token would need to come after the modules in the HTML.
Not if the styles must be in the <head> - and styles need to be in the <head> to work across mail clients (where they are supported at all).
For content other than styles, you could include a Velocity token in the module that sets a variable. And then in another Velocity token, check to see if that variable is set and output the content if so. But for this to work, the output token would need to come after the modules in the HTML.
Ok thank you this makes sense. Shame there's no way to do it but good to know about adding in a token that sets a variable, could be handy in the future.