subscribe_user

NAML documentation   Watch a video
   Usages of this macro
... in subscribe_user.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
45
<macro name="subscribe_user" 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.set_local_user
Macro
Parameters: user
.get_user_from_id
Binary
Namespace: NabbleNamespace
Parameters: user_id, do
 user_id="[n.get_parameter
Binary
Namespace: RequestNamespace
Parameters: name
 name='user'/]" />            
                        <n.local_user
Macro
Parameters: do
.profile_header
Macro
Requires: user
/>
                        
                        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_submitted_form
Macro
Requires: servlet
>
                            <then.local_user
Macro
Parameters: do
.save_field_values_user
Macro
Requires: user
/>
                            <else.local_user
Macro
Parameters: do
.load_field_values_user
Macro
Requires: user
/>
                        </n.if.is_submitted_form>
                        
                        <n.local_user
Macro
Parameters: do
.subscription_form_user
Macro
Requires: node_page, user
/>
                    </else>
                </n.if.visitor.is_anonymous>
            </body>
        </n.html>
    </n.node_page.>
</macro>