unsubscribe_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 "unsubscribe_by_code".
... in unsubscribe.naml
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<macro name="unsubscribe_by_code" requires="servlet">
    <n.node_page.>
        <n.catch_exception. id="remove-subscription">
            <n.page_node.get_subscription_by_code. code="[n.code_parameter/]">
                <n.if.not.is_subscribed>
                    <then.throw_template_exception name="not_subscribed"/>
                </n.if.not.is_subscribed>
                <n.if.is_submitted_form>
                    <then>
                        <n.remove/>
                        <n.send_unsubscription_reminder/>
                    </then>
                </n.if.is_submitted_form>
            </n.page_node.get_subscription_by_code.>
        </n.catch_exception.>
        <n.html>
            <head>
                <meta name="robots" content="noindex,nofollow"/>
                <n.title.><t>Remove Subscription</t></n.title.>
            </head>
            <body>
                <n.edit_header first_text="[n.page_node.subject/]" second_text="[t]Remove Subscription[/t]" />
 
                <n.if.has_exception for="remove-subscription">
                    <then.handle_unsubscription_by_code_errors/>
                    <else>
                        <n.if.is_submitted_form>
                            <then>
                                <h2><t>Subscription Removed</t></h2>
                                <t>Your subscription to <t.location.page_node.subject/> has been successfully removed.</t>
                            </then>
                            <else>
                                <h2><t>Do you really want to unsubscribe from <t.location><a href="[n.page_node.url/]"><n.page_node.subject/></a></t.location>?</t></h2>
                                <n.form.>
                                    <input type="hidden" name="code" value="[n.code_parameter/]"/>
                                    <input type="hidden" name="action" value="remove-subscription"/>
                                    <input type="submit" class="toolbar action-button" value="[t]Yes, unsubscribe now[/t]"/>
                                    <t>or</t> <a href="[n.page_node.url/]"><t>Cancel</t></a>
                                </n.form.>
                            </else>
                        </n.if.is_submitted_form>
                    </else>
                </n.if.has_exception>
            </body>
        </n.html>
    </n.node_page.>
</macro>