subscribe

NAML documentation   Watch a video
   Usages of this macro
... in subscribe.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<macro name="subscribe" requires="servlet">
    <n.node_page
Macro
Requires: servlet
Parameters: do
.>
        <n.html
Macro
Parameters: head, body
>
            <head>
                <meta name="robots" content="noindex,nofollow"/>
                <n.title
Macro
Parameters: text
.><t>Subscribe via email</t></n.title.>
                <n.main_title_css
Macro
/>
            </head>
            <body>
                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.is_anonymous
Binary
Namespace: UserNamespace
>
                    <then>
                        <n.edit_header
Macro
Parameters: first_text, second_text
 first_text="[n.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.subject
Macro
Requires: node
/]" second_text="[t]Email Subscription[/t]" />
                        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_submitted_form
Macro
Requires: servlet
>
                            <then>
                                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.equal
Binary
Namespace: BasicNamespace
Parameters: value2, value1
 value1="send-anonymous" value2="[n.action_parameter
Macro
/]">
                                    <then>
                                        <n.catch_exception
Binary
Namespace: BasicNamespace
Parameters: id, do
. id="send-email-block">
                                            <n.handle_anonymous_subscription
Macro
Requires: node_page
/>
                                        </n.catch_exception.>
                                    </then>
                                </n.if.equal>
                                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.has_exception
Binary
Namespace: BasicNamespace
Parameters: for
 for="send-email-block">
                                    <then.show_subscription_error
Macro
Requires: node_page
/>
                                    <else.show_success_message
Macro
/>
                                </n.if.has_exception>
                            </then>
                        </n.if.is_submitted_form>
                        <n.anonymous_subscription_form
Macro
/>
                    </then>
                    <else>
                        <n.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.profile_header
Macro
Requires: user
/>
 
                        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_submitted_form
Macro
Requires: servlet
>
                            <then.save_field_values
Macro
/>
                            <else.load_field_values
Macro
/>
                        </n.if.is_submitted_form>
 
                        <n.subscription_form
Macro
Requires: node_page
/>
                    </else>
                </n.if.visitor.is_anonymous>
            </body>
        </n.html>
    </n.node_page.>
</macro>