set_cookies

NAML documentation   Watch a video
   Usages of this macro
... in search.naml
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
<macro name="set_cookies" parameters="did_search">
    <script type="text/javascript">
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.both
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
 condition1="[n.not
Binary
Namespace: BasicNamespace
Parameters: condition
.is_empty
Binary
Namespace: BasicNamespace
Parameters: value
.query_param
Macro
/]" condition2="[n.did_search/]">
            <then>
                Nabble.setCookie("query", "<n.javascript_string_encode
Binary
Namespace: NabbleNamespace
Parameters: text
.query_param
Macro
/>");
                Nabble.setCookie("searchterms", "<n.search_terms
Binary
Namespace: SearchNamespace
/>");
            </then>
            <else>
                Nabble.deleteCookie("query");
                Nabble.deleteCookie("searchterms");
            </else>
        </n.if.both>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_author_search
Macro
>
            <then>
                Nabble.setCookie("searchuser", "<n.user
Binary
Namespace: SearchNamespace
Parameters: do
.search_id
Binary
Namespace: UserNamespace
/>");
            </then>
            <else>
                Nabble.deleteCookie("searchuser");
            </else>
        </n.if.is_author_search>
    </script>
</macro>