right use / interpretation of "requires" in macro

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

right use / interpretation of "requires" in macro

nnako
Hi,

I'm trying to create NAML macros, but unfortunately, the particular structure is not clear to me and I have not found ways, yet, to reliably find solutions for my problems. E.g. the "requires" parameter in a macro:

example from email.naml
 
<macro name="instant_html" requires="subscription,node_page">
    <n.if.page_node.is_app>
        <then>
            <t><t.username.page_node.owner.name/> created a new subcategory</t>:
            <b><n.page_node.subject/></b><br/><br/>
        </then>
    </n.if.page_node.is_app>
 
    <n.page_node.html_email_message_with_signature/>
    <br/>
    <br/>
    <hr noshade="noshade" size="1" color="#cccccc" />
    <div style="color:#444; font: 12px tahoma,geneva,helvetica,arial,sans-serif;">
        <div style="font-weight:bold"><t>If you reply to this email, your message will be added to the discussion below</t>:</div>
        <a href="[n.page_node.url/]"><n.page_node.url/></a>
    </div>
    <div style="color:#666; font: 11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
        <n.start_new_topic_line append="[br/]"/>
        <n.unsubscribe_line format="html"/><br/>
        <n.macro_viewer_email_link macro="instant_html"/>
    </div>
</macro>

In this standard example there are two "libraries?" required: "subscription" and "node_page". In order to use appropriate macros and binaries for my own macros, I'd like to know,

(1) How do I find out, which macros or binaries are accessible, when these "requires" are specified? Is there a list?

There are is one binary "page_node" used within the example macro. And some of its possible attributes "html_email_message_with_signature", "is_app", "owner.name", "subject" and "url".

(2) Does the binary "page_node" belong to the library "node_page"?

(3) Which exact meaning do the attributes (binaries and macros) "html_email_message_with_signature", "is_app", "owner.name", "subject" and "url" have and which further attributes belong to "page_node"?

From the context and the effect in real life, the meaning and function can be guessed, but I'm lookiing for an exact usage documentation including hints and reliable structure explanations.

Thanks.