adv_search_or_query

NAML documentation   Watch a video
   Usages of this macro
The source code below doesn't have navigation links because no usage has been compiled yet. Navigation links depend on how and where the macro is used, so first you may try finding all usages of "adv_search_or_query".
... in adv_search.naml
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<macro name="adv_search_or_query" parameters="name,field">
    <n.set_var. name="value"><n.trim.get_parameter name="[n.name/]" /></n.set_var.>
    <n.set_var. name="field"><n.hide_null.append text="[n.field/]" suffix=":" /></n.set_var.>
    <n.if.not.is_empty.var name="value">
        <then>
            <n.regex. pattern='(".+?"|[^ "]+)' text="[n.var name='value'/]">
                <n.no_output.next_element/>
                <n.if.not.has_more_elements>
                    <then>
                        <n.var name="field"/><n.current_element/>
                    </then>
                    <else>
                        <n.var name="field"/>(<n.current_element/>
                        <n.loop.>
                            <n.nop/> OR <n.current_element/>
                        </n.loop.>)
                    </else>
                </n.if.not.has_more_elements>
            </n.regex.>
        </then>
    </n.if.not.is_empty.var>
</macro>