macro_search_page

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 "macro_search_page".
... in macro_search_page.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
41
42
43
44
45
46
47
<override_macro name="macro_search_page" requires="servlet">
    <n.naml_tools.>
        <n.html>
            <head>
                <meta name="robots" content="noindex,follow"/>
                <n.title.>Search Macros</n.title.>
                <script type="text/javascript">
                    $(document).ready(function() {
                        var $input = $('#search_field');
                        $input.keydown(function(event) {
                            if (event.keyCode == 13) {
                                event.preventDefault();
                                $('form').submit();
                            }
                        });
                        $input.focus();
                    });
                </script>
            </head>
            <body>
                <n.macro_viewer_header.>
                    Macro Search
                </n.macro_viewer_header.>
 
                <n.if.is_empty.search_by_field.value>
                    <then.search_by_field.set_value value="name"/>
                </n.if.is_empty.search_by_field.value>
 
                <n.form. macro="macro_search_page" method="GET">
                    <img src="http://da7yjqciamcnr.cloudfront.net/images/icons/search.png" class="image16"/>
                    <input id="search_field" type="text" size="25" name="query" value="[n.hide_null.macro_search_query/]"/>
                    <input class="toolbar action-button" type="submit" value="[t]Search[/t]"/>
                    <div style="clear:both;padding:.3em 0 0 1em">
                        <n.search_by_field.radio id="by_name" option_value="name"/>
                        <label for="by_name">Macro by name</label><br/>
                        <n.search_by_field.radio id="by_text" option_value="text"/>
                        <label for="by_text">Macro source contains</label><br/>
                    </div>
                </n.form.>
 
                <div style="margin-top:1em">
                    <n.macro_search_results query="[n.macro_search_query/]" search_by="[n.search_by_field.value/]"/>
                </div>
            </body>
        </n.html>
    </n.naml_tools.>
</override_macro>
Overrides default macro
... in macro_viewer.naml
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
<macro name="macro_search_page" requires="servlet">
    <n.naml_tools.>
        <n.html>
            <head>
                <meta name="robots" content="noindex,follow"/>
                <n.title.>Search Macros</n.title.>
                <script type="text/javascript">
                    $(document).ready(function() {
                        var $input = $('#search_field');
                        $input.keydown(function(event) {
                            if (event.keyCode == 13) {
                                event.preventDefault();
                                $('form').submit();
                            }
                        });
                        $input.focus();
                    });
                </script>
            </head>
            <body>
                <n.macro_viewer_header.>
                    Macro Search
                </n.macro_viewer_header.>
 
                <n.if.is_empty.search_by_field.value>
                    <then.search_by_field.set_value value="name"/>
                </n.if.is_empty.search_by_field.value>
 
                <n.form. macro="macro_search_page" method="GET">
                    <img src="/images/search.png" class="image16"/>
                    <input id="search_field" type="text" size="25" name="query" value="[n.hide_null.macro_search_query/]"/>
                    <input class="toolbar action-button" type="submit" value="[t]Search[/t]"/>
                    <div style="clear:both;padding:.3em 0 0 1em">
                        <n.search_by_field.radio id="by_name" option_value="name"/>
                        <label for="by_name">Macro by name</label><br/>
                        <n.search_by_field.radio id="by_text" option_value="text"/>
                        <label for="by_text">Macro source contains</label><br/>
                    </div>
                </n.form.>
 
                <div style="margin-top:1em">
                    <n.macro_search_results query="[n.macro_search_query/]" search_by="[n.search_by_field.value/]"/>
                </div>
            </body>
        </n.html>
    </n.naml_tools.>
</macro>