subapp_section

NAML documentation   Watch a video
   Usages of this macro
... in subapp_section.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
<override_macro name="subapp_section" requires="node" dot_parameter="columns" parameters="length">
    <tr class="header-row category-row shaded-bg-color">
        <n.table_header
Macro
Parameters: do
.>
            <n.columns/>
        </n.table_header.>
    </tr>
    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.has_children
Binary
Namespace: NodeNamespace
>
        <then>
            <n.children_list
Macro
Requires: node
Parameters: filter, start, length, sort, do
. length="[n.length/]">
                <n.loop
Macro
Requires: sequence
Parameters: by, do
.>
                    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.current_node
Binary
Namespace: NodeList
Parameters: do
.can_be_viewed_by_visitor
Binary
Namespace: NodeNamespace
>
                        <then>
                            <tr class="main-row">
                                <n.columns/>
                            </tr>
                        </then>
                    </n.if.current_node.can_be_viewed_by_visitor>      
 
                </n.loop.>
                <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
. name="has_more_rows"><n.there_is_more
Binary
Namespace: NodeList
/></n.set_var.>
            </n.children_list.>
            <n.subapp_section_extra_row
Macro
Parameters: has_more
 has_more="[n.var
Binary
Namespace: BasicNamespace
Parameters: name
 name='has_more_rows'/]"/>
        </then>
        <else.subapp_section_extra_row
Macro
Parameters: has_more
 has_more="[n.false
Binary
Namespace: BasicNamespace
/]"/>
    </n.if.has_children>
</override_macro>
Overrides default macro
... in view_mixed.naml
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<macro name="subapp_section" requires="node" dot_parameter="columns" parameters="length">
    <tr class="header-row category-row shaded-bg-color">
        <n.table_header.>
            <n.columns/>
        </n.table_header.>
    </tr>
    <n.if.has_children>
        <then>
            <n.children_list. length="[n.length/]">
                <n.loop.>
                    <tr class="main-row">
                        <n.columns/>
                    </tr>
                </n.loop.>
                <n.set_var. name="has_more_rows"><n.there_is_more/></n.set_var.>
            </n.children_list.>
            <n.subapp_section_extra_row has_more="[n.var name='has_more_rows'/]"/>
        </then>
        <else.subapp_section_extra_row has_more="[n.false/]"/>
    </n.if.has_children>
</macro>