app_path

NAML documentation   Watch a video
   Usages of this macro
... in workgroup.naml
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<override_macro name="app_path" parameters="template,priority,assignee,index_record,date" requires="node">
    <n.encode_url
Macro
Parameters: text
.remove_spaces
Macro
Parameters: text
.>
        <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
. name="index_record">
            <n.to_null_if
Macro
Parameters: equals, value
. equals="0">
                <n.index_record/>
            </n.to_null_if.>
        </n.set_var.>
        <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
. name="template">
            <n.to_null_if
Macro
Parameters: equals, value
. equals="[n.app_default_template
Macro
/]">
                <n.template/>
            </n.to_null_if.>
        </n.set_var.>
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.is_null
Binary
Namespace: BasicNamespace
Parameters: value
.var
Binary
Namespace: BasicNamespace
Parameters: name
 name="template">
            <then>
                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.starts_with
Binary
Namespace: BasicNamespace
Parameters: prefix, text
 prefix="view_" text="[n.var
Binary
Namespace: BasicNamespace
Parameters: name
 name='template'/]">
                    <then>
                        <n.throw_runtime_exception
Binary
Namespace: BasicNamespace
Parameters: text
.>
                            template = <n.var
Binary
Namespace: BasicNamespace
Parameters: name
 name='template'/>
                        </n.throw_runtime_exception.>
                    </then>
                </n.if.not.starts_with>
                <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
. name="template">
                    <n.substring
Binary
Namespace: BasicNamespace
Parameters: end, text, begin
 text="[n.var
Binary
Namespace: BasicNamespace
Parameters: name
 name='template'/]" begin="5" />
                </n.set_var.>
            </then>
        </n.if.not.is_null.var>
        /
        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
>
            <condition>
                <n.not
Binary
Namespace: BasicNamespace
Parameters: condition
.all_true
Macro
Parameters: text
.>
                    <n.is_root
Binary
Namespace: NodeNamespace
/>
                    <n.is_null
Binary
Namespace: BasicNamespace
Parameters: value
.var
Binary
Namespace: BasicNamespace
Parameters: name
 name='template'/>
                    <n.is_null
Binary
Namespace: BasicNamespace
Parameters: value
.date/>
                    <n.is_null
Binary
Namespace: BasicNamespace
Parameters: value
.priority/>
                    <n.is_null
Binary
Namespace: BasicNamespace
Parameters: value
.assignee/>
                    <n.is_null
Binary
Namespace: BasicNamespace
Parameters: value
.var
Binary
Namespace: BasicNamespace
Parameters: name
 name='index_record'/>
                </n.not.all_true.>
            </condition>
            <then>
                <n.url_encoded_subject
Binary
Namespace: NodeNamespace
/>
                -f<n.id
Binary
Namespace: NodeNamespace
/>
                <n.hide_null
Binary
Namespace: BasicNamespace
Parameters: value
.prepend
Binary
Namespace: BasicNamespace
Parameters: prefix, text, except_if
. prefix="p"><n.priority/></n.hide_null.prepend.>
                <n.hide_null
Binary
Namespace: BasicNamespace
Parameters: value
.prepend
Binary
Namespace: BasicNamespace
Parameters: prefix, text, except_if
. prefix="a"><n.assignee/></n.hide_null.prepend.>
                <n.hide_null
Binary
Namespace: BasicNamespace
Parameters: value
.prepend
Binary
Namespace: BasicNamespace
Parameters: prefix, text, except_if
. prefix="i"><n.var
Binary
Namespace: BasicNamespace
Parameters: name
 name="index_record"/></n.hide_null.prepend.>
                <n.hide_null
Binary
Namespace: BasicNamespace
Parameters: value
.prepend
Binary
Namespace: BasicNamespace
Parameters: prefix, text, except_if
. prefix="d"><n.date/></n.hide_null.prepend.>
                <n.hide_null
Binary
Namespace: BasicNamespace
Parameters: value
.prepend
Binary
Namespace: BasicNamespace
Parameters: prefix, text, except_if
. prefix="."><n.var
Binary
Namespace: BasicNamespace
Parameters: name
 name="template"/></n.hide_null.prepend.>
                .html
            </then>
        </n.if>
    </n.encode_url.remove_spaces.>
</override_macro>
Overrides default macro
... in app.naml
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
<macro name="app_path" parameters="template,index_record,date" requires="node">
    <n.encode_url.remove_spaces.>
        <n.set_var. name="index_record">
            <n.to_null_if. equals="0">
                <n.index_record/>
            </n.to_null_if.>
        </n.set_var.>
        <n.set_var. name="template">
            <n.to_null_if. equals="[n.app_default_template/]">
                <n.template/>
            </n.to_null_if.>
        </n.set_var.>
        <n.if.not.is_null.var name="template">
            <then>
                <n.if.not.starts_with prefix="view_" text="[n.var name='template'/]">
                    <then>
                        <n.throw_runtime_exception.>
                            template = <n.var name='template'/>
                        </n.throw_runtime_exception.>
                    </then>
                </n.if.not.starts_with>
                <n.set_var. name="template">
                    <n.substring text="[n.var name='template'/]" begin="5" />
                </n.set_var.>
            </then>
        </n.if.not.is_null.var>
        /
        <n.if>
            <condition>
                <n.not.all_true.>
                    <n.is_root/>
                    <n.is_null.var name='template'/>
                    <n.is_null.date/>
                    <n.is_null.var name='index_record'/>
                </n.not.all_true.>
            </condition>
            <then>
                <n.url_encoded_subject/>
                -f<n.id/>
                <n.hide_null.prepend. prefix="i"><n.var name="index_record"/></n.hide_null.prepend.>
                <n.hide_null.prepend. prefix="d"><n.date/></n.hide_null.prepend.>
                <n.hide_null.prepend. prefix="."><n.var name="template"/></n.hide_null.prepend.>
                .html
            </then>
        </n.if>
    </n.encode_url.remove_spaces.>
</macro>