Login  Register

Re: how to access "node.subject" and "location.local_node.subject" in the same macro

Posted by Mencey Melgar on Dec 04, 2014; 8:41am
URL: https://support.nabble.com/how-to-access-node-subject-and-location-local-node-subject-in-the-same-macro-tp7592800p7593020.html

Hi there again,

I managed the code to add the Subforum name (the "BLUE" one) but we have a problem... At this point, I noticed that when you reply to the email, it creates a new topic with the subject name. I leave you the code here so you'll be abled to make tests:

note: you have to override the "send_subscription_email"

<override_macro name="send_subscription_email" parameters="node_attr,text_part,html_part" requires="subscription">
    <n.set_local_subscription.this_subscription/>
    <n.set_local_node.node_attr/>
    <n.block.>
        <n.new_email.>
            <n.send>
                <to.local_subscription.user.user_email/>
                <to_name.local_subscription.user.name/>
                <from.local_subscription.user.reply_address_for.local_node/>
                <from_name>
                    <n.local_node.owner.name/> [via <n.root_node.subject/>]
                </from_name>
                <subject>
                    <n.local_node.subject/>
                    <t>App parent: <t.location.local_node.get_app_node.subject/></t> 
                </subject>
                <text_part.text_part/>
                <html_part.html_part/>
                <set_headers_for.local_node/>
                <bounce_to.local_subscription.user.bounces_address/>
            </n.send>
        </n.new_email.>
    </n.block.>
</override_macro>
:) Helper