Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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 would suggest looking into a custom field type.
A guide can be found here:
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.
In the end I used a hidden field with a magic string for node ID to get the IPublishedContent.
var nodeId = "0";
foreach (var field in Model.Fields)
if ( field.Alias == "nodeId" )
var id = field.GetValue();
nodeId = id.ToString();
var node = nodeId != "0" ? Umbraco.TypedContent(nodeId) : null ;
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted