search_page_html

NAML documentation   Watch a video
   Usages of this macro
... in search_page_html.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<override_macro name="search_page_html" requires="servlet">
    <n.define_search_query_field
Macro
/>
    <n.node_page
Macro
Requires: servlet
Parameters: do
.search_namespace
Binary
Namespace: NodePageNamespace
Parameters: do
.>
        <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
 name='didSearch' value="false" />
        <n.catch_exception
Binary
Namespace: BasicNamespace
Parameters: id, do
. id="search-block">
            <n.do_search_using_params
Macro
Requires: search
 />
            <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
 name='didSearch' value="true" />
        </n.catch_exception.>
        <n.html
Macro
Parameters: head, body
>
            <head>
                <meta name="robots" content="noindex,nofollow"/>
                <n.search_page_title
Macro
Requires: search
/>
                <n.set_cookies
Macro
Parameters: did_search
 did_search="[n.var
Binary
Namespace: BasicNamespace
Parameters: name
 name='didSearch'/]" />
                <n.search_page_style
Macro
Requires: search
/>
            </head>
            <body>
                <n.show_search_form
Macro
Requires: search
/>
                <n.show_search_error
Macro
Requires: search
/>
                <n.search_results_header
Macro
Requires: search
/>
 
                <n.results
Binary
Namespace: SearchNamespace
Parameters: do
.loop
Macro
Requires: sequence
Parameters: by, do
.current_node
Binary
Namespace: NodeList
Parameters: do
.>
                    <n.comment
Macro
Parameters: text
.>do not include chat notices section in search results</n.comment.>
                    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.equal
Binary
Namespace: BasicNamespace
Parameters: value2, value1
 value1="[n.current_node
Binary
Namespace: NodeList
Parameters: do
.get_app_node
Binary
Namespace: NodeNamespace
Parameters: do
.id
Binary
Namespace: NodeNamespace
/]" value2="5514">
                        <then><n.search_result_row
Macro
Requires: node, search
/></then>                    
                    </n.if.not.equal>
                </n.results.loop.current_node.>
 
                <n.search_pagination
Macro
Requires: search
/>
 
                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.lucene_is_ready
Binary
Namespace: NabbleNamespace
>
                    <then.index_rebuilt_notice
Macro
Requires: search
/>
                </n.if.not.lucene_is_ready>
 
                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.has_results
Binary
Namespace: SearchNamespace
>
                    <then.show_search_form
Macro
Requires: search
/>
                </n.if.has_results>
            </body>
        </n.html>
    </n.node_page.search_namespace.>
</override_macro>
Overrides default macro
... in search.naml
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<macro name="search_page_html" requires="servlet">
    <n.define_search_query_field/>
    <n.node_page.search_namespace.>
        <n.set_var name='didSearch' value="false" />
        <n.catch_exception. id="search-block">
            <n.do_search_using_params />
            <n.set_var name='didSearch' value="true" />
        </n.catch_exception.>
        <n.html>
            <head>
                <meta name="robots" content="noindex,nofollow"/>
                <n.search_page_title/>
                <n.set_cookies did_search="[n.var name='didSearch'/]" />
                <n.search_page_style/>
            </head>
            <body>
                <n.show_search_form/>
                <n.show_search_error/>
                <n.search_results_header/>
 
                <n.results.loop.current_node.>
                    <n.search_result_row/>
                </n.results.loop.current_node.>
 
                <n.search_pagination/>
 
                <n.if.not.lucene_is_ready>
                    <then.index_rebuilt_notice/>
                </n.if.not.lucene_is_ready>
 
                <n.if.has_results>
                    <then.show_search_form/>
                </n.if.has_results>
            </body>
        </n.html>
    </n.node_page.search_namespace.>
</macro>