Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Passing text into a custom module
SOLVEOccasional Contributor
12-05-2018 01:26
Hi, code question about calling custom modules.
I've set up custom modules to house the various email code components. For instance my header 3 component loos like this:
<font face="'Ubuntu' , Helvetica, Arial, sans-serif;" size="3" color="#D3BB39"> <h3 style="font-weight: 500; color: #D3BB39; font-size: 18px; line-height: 120%; margin: 22px 0 9px 0;">{% text "h3_text" value="{{ module.h3_text }}", no_wrapper="True" %}</h3> </font>
I then create a new email template and call the component like this:
{% module "h3" module_id="4406934" label="section header" %}
My question: is there a way to pass in / pre-populate the text when I call the h3 component? Thanks.
ps - what I'm trying to do is create a single source of truth for various email elements like headers, buttons, etc. If I can pass in the text when I call the component that will allow for great flexibility.
Solved! Go to Solution.
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content