unsub_descendants

NAML documentation   Watch a video
   Usages of this macro
... in unsubscribe_user_all.naml
42
43
44
45
46
47
48
49
50
51
52
53
<macro name='unsub_descendants' requires='node' parameters='user'>    
     <n.set_local_user
Macro
Parameters: user
.user/>
     <n.set_local_subscription
Macro
Parameters: subscription
.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.subscription_for
Binary
Namespace: NodeNamespace
Parameters: do, email
 email="[n.local_user
Macro
Parameters: do
.user_email
Binary
Namespace: UserNamespace
/]" />
     <n.this_node
Binary
Namespace: NodeNamespace
Parameters: do
.descendant_apps_list
Binary
Namespace: NodeNamespace
Parameters: do
.>
        <n.loop
Macro
Requires: sequence
Parameters: by, do
.>
            <n.set_local_subscription
Macro
Parameters: subscription
.current_node
Binary
Namespace: NodeList
Parameters: do
.subscription_for
Binary
Namespace: NodeNamespace
Parameters: do, email
 email="[n.local_user
Macro
Parameters: do
.user_email
Binary
Namespace: UserNamespace
/]" />
            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.current_node
Binary
Namespace: NodeList
Parameters: do
.local_subscription
Macro
Parameters: do
.is_subscribed
Binary
Namespace: SubscriptionNamespace
>
                <then.current_node
Binary
Namespace: NodeList
Parameters: do
.local_subscription
Macro
Parameters: do
.remove
Binary
Namespace: SubscriptionNamespace
/>
            </n.if.current_node.local_subscription.is_subscribed>    
        </n.loop.>
    </n.this_node.descendant_apps_list.>
</macro>