app_topic_count

NAML documentation   Watch a video
   Usages of this macro
... in tweaks.naml
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<override_macro name="app_topic_count" requires="node_page,servlet">
    <n.remove_spaces
Macro
Parameters: text
.>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.is_root
Binary
Namespace: NodeNamespace
>
            <then>
                <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
. name="count"><n.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.topic_count
Binary
Namespace: NodeNamespace
Parameters: filter
 filter="[n.app_topic_filter
Macro
Requires: node_page, servlet
/]"/></n.set_var.>
                <n.string_list
Binary
Namespace: BasicNamespace
Parameters: trim, values, do, separator
. values="[n.subapps_with_hidden_topics
Macro
/]" separator="," trim="[n.true
Binary
Namespace: BasicNamespace
/]">
                    <n.loop
Macro
Requires: sequence
Parameters: by, do
.>
                        <n.int
Binary
Namespace: BasicNamespace
Parameters: i, do
>
                            <i.var
Binary
Namespace: BasicNamespace
Parameters: name
 name="count"/>
                            <do>
                                <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
. name="count">
                                    <n.minus
Binary
Namespace: IntegerNamespace
Parameters: i
>
                                        <i.get_node_from_id
Binary
Namespace: NabbleNamespace
Parameters: do, node_id
. node_id="[n.current_string
Binary
Namespace: StringList
/]">
                                            <n.topic_count
Binary
Namespace: NodeNamespace
Parameters: filter
/>
                                        </i.get_node_from_id.>
                                    </n.minus>                                                                                
                                </n.set_var.>
                            </do>
                        </n.int>
                    </n.loop.>
                </n.string_list.>
                <n.var
Binary
Namespace: BasicNamespace
Parameters: name
 name="count"/>
            </then>
            <else.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.topic_count
Binary
Namespace: NodeNamespace
Parameters: filter
 filter="[n.app_topic_filter
Macro
Requires: node_page, servlet
/]" />
        </n.if.page_node.is_root>    
    </n.remove_spaces.>
</override_macro>
Overrides default macro
... in app.naml
294
295
296
<macro name="app_topic_count" requires="node_page,servlet">
    <n.page_node.topic_count filter="[n.app_topic_filter/]" />
</macro>