map_sitemap

NAML documentation   Watch a video
   Usages of this macro
... in sitemap.naml
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<macro name="map_sitemap" requires="url_mapper">  
    <n.regex
Binary
Namespace: BasicNamespace
Parameters: pattern, text, do
 text="[n.path
Binary
Namespace: UrlMapperNamespace
/]">  
        <pattern>  
            ^/sitemap.txt$  
        </pattern>  
        <do>  
            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.find
Binary
Namespace: RegexNamespace
>  
                <then>  
                    <n.set_parameter
Binary
Namespace: UrlMapperNamespace
Parameters: name, value
 name="macro" value="sitemap_txt" />  
                    <n.exit
Binary
Namespace: BasicNamespace
/>  
                </then>  
            </n.if.find>  
        </do>  
    </n.regex>  
</macro>