Login  Register

Re: Navigate from Topic to Topic?

Posted by Pedro on Oct 16, 2013; 4:40am
URL: https://support.nabble.com/Navigate-from-Topic-to-Topic-tp7587248p7587321.html

Please, try this for the previous topic:
<override_macro name="topic_controls_right" requires="forum_topic_namespace">
    <n.pin_icon/>
    <n.lock_icon/>
    <n.message_count/>
    <img src="/images/gear.png" class="image16" alt="[t]Options[/t]"/>
    <n.page_node.topic_dropdown/>
    <n.next_topic/>
    <n.prev_topic/>
</override_macro>



<macro name='prev_topic'>
    <n.page_node.get_app_node.children_list. start="[n.app_index_record/]"
    length="[n.app_rows_per_page/]"
    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.loop.>           
            <n.if.equal value1="[n.current_node.id/]" value2="[n.page_node.id/]">                
                <then>                   
                    <a href="[n.var name='last_url'/]">Prev Topic</a>                   
                </then>  
            </n.if.equal>
            <n.set_var. name='last_url'><n.current_node.url/></n.set_var.>           
        </n.loop.>
    </n.page_node.get_app_node.children_list.>
</macro>
My test forum.