message_as_html

NAML documentation   Watch a video
   Usages of this macro
... in message_as_html.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<override_macro name="message_as_html" requires="message">
    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.either
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
 condition1="[n.is_deleted
Binary
Namespace: MessageNamespace
/]" condition2="[n.is_deactivated
Binary
Namespace: MessageNamespace
/]">
        <then>
            <b><t>CONTENTS DELETED</t></b>
            <div class="weak-color"><t>The author has deleted this message.</t></div>
        </then>
        <else>
            <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
. name="output">
                <n.as_html_list
Binary
Namespace: MessageNamespace
Parameters: do
.process_message_html
Macro
Requires: html_list
 />
            </n.set_var.>
            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_imported_mail
Binary
Namespace: MessageNamespace
>
                <then.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
. name="output">
                    <n.remove_unsubscription_link
Macro
Parameters: html
.var
Binary
Namespace: BasicNamespace
Parameters: name
 name="output" />
                </then.set_var.>
            </n.if.is_imported_mail>
            <n.var
Binary
Namespace: BasicNamespace
Parameters: name
 name="output" />
        </else>
    </n.if.either>
</override_macro>
Overrides default macro
... in message.naml
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<macro name="message_as_html" requires="message">
    <n.if.either condition1="[n.is_deleted/]" condition2="[n.is_deactivated/]">
        <then>
            <b><t>CONTENTS DELETED</t></b>
            <div class="weak-color"><t>The author has deleted this message.</t></div>
        </then>
        <else>
            <n.set_var. name="output">
                <n.as_html_list.process_message_html />
            </n.set_var.>
            <n.if.is_imported_mail>
                <then.set_var. name="output">
                    <n.remove_unsubscription_link.var name="output" />
                </then.set_var.>
            </n.if.is_imported_mail>
            <n.var name="output" />
        </else>
    </n.if.either>
</macro>