subscribe_by_code

NAML documentation   Watch a video
   Usages of this macro
The source code below doesn't have navigation links because no usage has been compiled yet. Navigation links depend on how and where the macro is used, so first you may try finding all usages of "subscribe_by_code".
... in subscribe_by_code.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
<override_macro name="subscribe_by_code" requires="servlet">
    <n.node_page.>
        <n.catch_exception. id="save-subscription">
            <n.page_node.get_subscription_by_code. code="[n.code_parameter/]">
                <n.if.not.is_subscribed>
                    <then>
                        <n.save to="[n.subscription_to_field.value/]" type="INSTANT" />
                    </then>
                    <else.throw_template_exception name="already_subscribed"/>
                </n.if.not.is_subscribed>
            </n.page_node.get_subscription_by_code.>
        </n.catch_exception.>
        <n.html>
            <head>
                <meta name="robots" content="noindex,nofollow"/>
                <n.title.><t>Subscription Confirmation</t></n.title.>
            </head>
            <body>
                <n.edit_header first_text="[n.page_node.subject/]" second_text="Subscription Confirmation" />
                <br/>
                <n.if.has_exception for="save-subscription">
                    <then>
                        <n.handle_exception. for="save-subscription">
                            <n.exception. name="invalid_link">
                                <h2><t>Invalid Code</t></h2>
                                <p><t>The code in the URL is not valid.</t>
                                <t>Please contact Nabble Support if you need help.</t></p>
                            </n.exception.>
                            <n.exception. name="already_subscribed">
                                <h2><t>Subscribed</t></h2>
                                <p><t>You are subscribed to <n.page_node.subject/>.</t></p>
                            </n.exception.>
                        </n.handle_exception.>
                    </then>
                    <else>
                        <h2><t>Subscription Confirmed</t></h2>
                        <p><t>From now on, you will receive an email for each message posted under <t.location.page_node.subject/>.</t></p>
                    </else>
                </n.if.has_exception>
            </body>
        </n.html>
    </n.node_page.>
</override_macro>
Overrides default macro
... in subscribe.naml
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
<macro name="subscribe_by_code" requires="servlet">
    <n.node_page.>
        <n.catch_exception. id="save-subscription">
            <n.page_node.get_subscription_by_code. code="[n.code_parameter/]">
                <n.if.not.is_subscribed>
                    <then.save to="[n.subscription_to_field.value/]" type="INSTANT" />
                    <else.throw_template_exception name="already_subscribed"/>
                </n.if.not.is_subscribed>
            </n.page_node.get_subscription_by_code.>
        </n.catch_exception.>
        <n.html>
            <head>
                <meta name="robots" content="noindex,nofollow"/>
                <n.title.><t>Subscription Confirmation</t></n.title.>
            </head>
            <body>
                <n.edit_header first_text="[n.page_node.subject/]" second_text="Subscription Confirmation" />
                <br/>
                <n.if.has_exception for="save-subscription">
                    <then>
                        <n.handle_exception. for="save-subscription">
                            <n.exception. name="invalid_link">
                                <h2><t>Invalid Code</t></h2>
                                <p><t>The code in the URL is not valid.</t>
                                <t>Please contact Nabble Support if you need help.</t></p>
                            </n.exception.>
                            <n.exception. name="already_subscribed">
                                <h2><t>Already Subscribed</t></h2>
                                <p><t>You are already subscribed to <n.page_node.subject/>.</t></p>
                            </n.exception.>
                        </n.handle_exception.>
                    </then>
                    <else>
                        <h2><t>Subscription Confirmed</t></h2>
                        <p><t>From now on, you will receive an email for each message posted under <t.location.page_node.subject/>.</t></p>
                    </else>
                </n.if.has_exception>
            </body>
        </n.html>
    </n.node_page.>
</macro>