map_atom_feeds

NAML documentation   Watch a video
   Usages of this macro
... in url_mapper.naml
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<macro name="map_atom_feeds" requires="url_mapper">
    <n.regex
Binary
Namespace: BasicNamespace
Parameters: pattern, text, do
 text="[n.path
Binary
Namespace: UrlMapperNamespace
/]">
        <pattern>
            -f(t)?(\d+)(n(\d+))?.xml$
        </pattern>
        <do>
            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.find
Binary
Namespace: RegexNamespace
>
                <then>
                    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.did_find
Macro
Requires: regex
Parameters: group
 group="1">
                        <then.set_parameter
Binary
Namespace: UrlMapperNamespace
Parameters: name, value
 name="macro" value="atom_topics_by_date" />
                        <else.set_parameter
Binary
Namespace: UrlMapperNamespace
Parameters: name, value
 name="macro" value="atom_posts_by_date" />
                    </n.if.did_find>
                    <n.set_parameter_to_found
Macro
Requires: url_mapper, regex
Parameters: name, group
 name="node" group="2" />
                    <n.set_parameter_if_found
Macro
Requires: url_mapper, regex
Parameters: name, group
 name="length" group="4" />
                    <n.exit
Binary
Namespace: BasicNamespace
/>
                </then>
            </n.if.find>
        </do>
    </n.regex>
</macro>
Feedback, Links, Privacy, Rules, Support, About