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 have a custom datatype and in it, I would like to look at the current node I'm editing, does the datatype know where it is during editing? Ideally I would like to do something like:
Document doc = new Document(currentPage.id);
To clarify, I need to know this in the OnInit().
Hi Sebastiaan,
The id is passed as the querystring parameter so int.parse(Request.Querystring["id"]) should be your friend.
Cheers,
Richard
Well, that really was too easy! Thanks Richard, I ended up using:
CMSNode currentNode = new CMSNode(((umbraco.cms.businesslogic.datatype.DefaultData)_data).NodeId);
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Does a datatype have knowledge of where it's used?
I have a custom datatype and in it, I would like to look at the current node I'm editing, does the datatype know where it is during editing? Ideally I would like to do something like:
To clarify, I need to know this in the OnInit().
Hi Sebastiaan,
The id is passed as the querystring parameter so int.parse(Request.Querystring["id"]) should be your friend.
Cheers,
Richard
Well, that really was too easy! Thanks Richard, I ended up using:
is working on a reply...