next_topic.naml

<macro name='next_topic'>
    <n.page_node.get_app_node.children_list. start="0"
    length="[n.page_node.get_app_node.child_count/]"
    filter="[n.app_topic_filter/]"
    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.>Added Next Topic links</n.comment.> 
        <n.loop.>
            
            <n.if.equal value1="[n.current_node.id/]" value2="[n.page_node.id/]">                
                <then>
                    <n.if.next_node>
                        <then>
                            <a href="[n.current_node.url/]">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>