Question

Creating universal content block with custom code

  • 29 January 2024
  • 2 replies
  • 152 views

Badge

I am researching if Klaviyo can do what I want and am struggling a bit.

 

I have designed content blocks from a designer, by now I can code the simple ones and import them as a template. It works then but I cant save the whole section as a Universal Content Block then. It is a template as a whole. Only stuff I build up in the drag and drop editor can be saved as a UCB.


Attached is the design of a product block. The background has a fade and rounded corners, something that is not possible in the drag and drop editor. The marketing team will then be able to upload a transparent product image. However I cant save this as a reusable section.


Any thoughts?

 

> In other news I am struggling with the inability to add css classes to sections. If I add css (by hacking a text section) it applies it to all td’s etc which doesnt work. Any ideas on that ?

 

Thanks

 

 


2 replies

Userlevel 7
Badge +60

Hi there @cacti

 

Thanks for sharing your question with us, happy to help! 

 

While you can’t access our drag and drop features, like universal content, in custom templates, if you build a hybrid template  you could then have access to these features! 

 

I would contact your design who originally created this blocks to create this for you or reach out to one of our awesome partners, or better yet Community Champions, to set this up for you.

 

Hope this helps!

-Taylor 

Badge

Hi @taylor - thank you. I did make a hybrid template but with that you wont be able to save a section as a universal content block unfortunately.

As an example I created this little block to show a product on. I can save the image block as universal but not the whole block / section that has the background with rounded corners and gradient.

This was custom coded as a hybrid template. 

 

Reply