I'm in the process of writing a custom theme for my email templates and want to access content from the submitted page via TypedContent, but struggling to pass in the node ID?
Can someone please point me in the right direction?
I've used this to create a hidden field, have the field value set to the name of the page the form is on and then have this come through on the email that is sent out. You could similarly use this to get the node ID into the template.
Custom theme - How to get page id
Hello,
I'm in the process of writing a custom theme for my email templates and want to access content from the submitted page via TypedContent, but struggling to pass in the node ID?
Can someone please point me in the right direction?
Many thanks, Phil
Hi Phil,
I would suggest looking into a custom field type. A guide can be found here:
https://our.umbraco.com/documentation/Add-ons/umbracoforms/developer/extending/adding-a-fieldtype
I've used this to create a hidden field, have the field value set to the name of the page the form is on and then have this come through on the email that is sent out. You could similarly use this to get the node ID into the template.
Kind Regards, Lewis
Thanks Lewis,
In the end I used a hidden field with a magic string for node ID to get the IPublishedContent.
is working on a reply...