next_topic

NAML documentation   Watch a video
   Usages of this macro
... in next_topic.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
<macro name='next_topic'>
    <n.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.get_app_node
Binary
Namespace: NodeNamespace
Parameters: do
.children_list
Macro
Requires: node
Parameters: filter, start, length, sort, do
. start="0"
    length="[n.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.get_app_node
Binary
Namespace: NodeNamespace
Parameters: do
.child_count
Binary
Namespace: NodeNamespace
/]"
    filter="[n.app_topic_filter
Macro
Requires: node_page, servlet
/]"
    sort="[n.if.app_is_by_priority][then]priority[/then][else]pinned-and-last-node-date[/else][/n.if.app_is_by_priority]" >
        <n.comment
Macro
Parameters: text
.>Added Next Topic links</n.comment.> 
        <n.loop
Macro
Requires: sequence
Parameters: by, do
.>
            
            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.equal
Binary
Namespace: BasicNamespace
Parameters: value2, value1
 value1="[n.current_node
Binary
Namespace: NodeList
Parameters: do
.id
Binary
Namespace: NodeNamespace
/]" value2="[n.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.id
Binary
Namespace: NodeNamespace
/]">                
                <then>
                    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.next_node
Binary
Namespace: NodeList
>
                        <then>
                            <a href="[n.current_node
Binary
Namespace: NodeList
Parameters: do
.url
Macro
Requires: node
Parameters: template, date, index_record
/]">Next Topic</a>
                        </then>
                        <else>
                            <t>Next Topic</t>
                        </else>
                    </n.if.next_node>                        
                </then>  
            </n.if.equal>
            
        </n.loop.>
    </n.page_node.get_app_node.children_list.>
</macro>