Opciones
- Suscribirse a un feed RSS
- Marcar tema como nuevo
- Marcar tema como leído
- Flotar este Tema para el usuario actual
- Favorito
- Suscribir
- Página de impresión sencilla
Passing text into a custom module
resolver
Highlighted
Colaborador ocasional
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.
¡Resuelto! Ir a solución.
Opciones
- Marcar como nuevo
- Favorito
- Suscribir
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Enviar un correo electrónico a un amigo
- Informe de contenido inapropiado