Opções
- Inscrever-se no RSS Feed
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico do usuário atual
- Favorito
- Inscrever-se
- Página amigável para impressora
Passing text into a custom module
resolver
Highlighted
Berater
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.
Solucionado! Ir para Solução.
Opções
- Marcar como novo
- Favorito
- Inscrever-se
- Inscrever-se no RSS Feed
- Realçar
- Imprimir
- Enviar e-mail a um amigo
- Relatar conteúdo como inapropriado