sitemap.naml

<override_macro name="url mapper" requires="url_mapper">  
    <n.overridden/>  
    <n.map_sitemapA/>  
    <n.map_sitemapB/>  
    <n.map_sitemapC/>  
    <n.map_sitemapD/>  
    <n.map_sitemapU1/>  
    <n.map_sitemapU2/>      
</override_macro>  

<macro name="map_sitemapA" requires="url_mapper">  
    <n.regex text="[n.path/]">  
        <pattern>  
            ^/sitemapA.txt$  
        </pattern>  
        <do>  
            <n.if.find>  
                <then>  
                    <n.set_parameter name="macro" value="sitemapA_txt" />  
                    <n.exit/>  
                </then>  
            </n.if.find>  
        </do>  
    </n.regex>  
</macro>  

<macro name="map_sitemapB" requires="url_mapper">  
    <n.regex text="[n.path/]">  
        <pattern>  
            ^/sitemapB.txt$  
        </pattern>  
        <do>  
            <n.if.find>  
                <then>  
                    <n.set_parameter name="macro" value="sitemapB_txt" />  
                    <n.exit/>  
                </then>  
            </n.if.find>  
        </do>  
    </n.regex>  
</macro>  

<macro name="map_sitemapC" requires="url_mapper">  
    <n.regex text="[n.path/]">  
        <pattern>  
            ^/sitemapC.txt$  
        </pattern>  
        <do>  
            <n.if.find>  
                <then>  
                    <n.set_parameter name="macro" value="sitemapC_txt" />  
                    <n.exit/>  
                </then>  
            </n.if.find>  
        </do>  
    </n.regex>  
</macro>  

<macro name="map_sitemapD" requires="url_mapper">  
    <n.regex text="[n.path/]">  
        <pattern>  
            ^/sitemapD.txt$  
        </pattern>  
        <do>  
            <n.if.find>  
                <then>  
                    <n.set_parameter name="macro" value="sitemapD_txt" />  
                    <n.exit/>  
                </then>  
            </n.if.find>  
        </do>  
    </n.regex>  
</macro>  

<macro name="map_sitemapU1" requires="url_mapper">  
    <n.regex text="[n.path/]">  
        <pattern>  
            ^/sitemapU1.txt$  
        </pattern>  
        <do>  
            <n.if.find>  
                <then>  
                    <n.set_parameter name="macro" value="sitemapU1_txt" />  
                    <n.exit/>  
                </then>  
            </n.if.find>  
        </do>  
    </n.regex>  
</macro>  

<macro name="map_sitemapU2" requires="url_mapper">  
    <n.regex text="[n.path/]">  
        <pattern>  
            ^/sitemapU2.txt$  
        </pattern>  
        <do>  
            <n.if.find>  
                <then>  
                    <n.set_parameter name="macro" value="sitemapU2_txt" />  
                    <n.exit/>  
                </then>  
            </n.if.find>  
        </do>  
    </n.regex>  
</macro>  

<macro name="sitemapA_txt" unindent="true">  
    <n.text_response/>
    <n.root_node.descendant_apps_list.>
        <n.loop.>
            <n.current_node.url/><n.crlf/>
        </n.loop.>
    </n.root_node.descendant_apps_list.>   
    
    <n.root_node.topics_list. start="0" length="49000" sort="last-node-date">
        <n.loop.>
            <n.base_url/><n.current_node.topic_path view="[n.classic_view/]"/><n.crlf/>
        </n.loop.>
    </n.root_node.topics_list.>
</macro> 

<macro name="sitemapB_txt" unindent="true">  
    <n.text_response/>
    <n.root_node.topics_list. start="49000" length="50000" sort="last-node-date">
        <n.loop.>
            <n.base_url/><n.current_node.topic_path view="[n.classic_view/]"/><n.crlf/>
        </n.loop.>
    </n.root_node.topics_list.>
</macro> 

<macro name="sitemapC_txt" unindent="true">  
    <n.text_response/>
    <n.root_node.topics_list. start="99000" length="50000" sort="last-node-date">
        <n.loop.>
            <n.base_url/><n.current_node.topic_path view="[n.classic_view/]"/><n.crlf/>
        </n.loop.>
    </n.root_node.topics_list.>
</macro>

<macro name="sitemapD_txt" unindent="true">  
    <n.text_response/>
    <n.root_node.topics_list. start="149000" length="50000" sort="last-node-date">
        <n.loop.>
            <n.base_url/><n.current_node.topic_path view="[n.classic_view/]"/><n.crlf/>
        </n.loop.>
    </n.root_node.topics_list.>
</macro>

<macro name="sitemapU1_txt" unindent="true">  
    <n.text_response/>  
    <n.site_users. start="0" length="50000">
        <n.loop.>
            <n.current_user.url/><n.crlf/>
        </n.loop.>
    </n.site_users.>       
</macro> 

<macro name="sitemapU2_txt" unindent="true">  
    <n.text_response/>  
    <n.site_users. start="50000" length="50000">
        <n.loop.>
            <n.current_user.url/><n.crlf/>
        </n.loop.>
    </n.site_users.>       
</macro>