var currentId = _contentmentContentContext.GetCurrentContentId(out bool isParent);
When i click a node in the content tree that has a property using my data list the variable currentId is always null. Seems like the current request url is /umbraco/backoffice/umbracoapi/content/GetEmptyByKeys (which contains no query information about the current node).
Am i missing something? How can i get the current node?
Thanks!
Steps to reproduce
Try accessing contextual data using _contentmentContentContext.GetCurrentContentId() inside GetItems() of a custom data source.
Which Contentment version are you using?
4.7.0
Which Umbraco version are you using? For example: 13.2.1 - don't just write v13
13.5.1
Bug summary
I'm trying to access contextual data in a custom data source for a data list (as explained here: https://github.com/leekelleher/umbraco-contentment/blob/develop/docs/editors/data-list.md). I Got the following line inside the GetItems-method:
var currentId = _contentmentContentContext.GetCurrentContentId(out bool isParent);
When i click a node in the content tree that has a property using my data list the variable
currentId
is always null. Seems like the current request url is/umbraco/backoffice/umbracoapi/content/GetEmptyByKeys
(which contains no query information about the current node).Am i missing something? How can i get the current node? Thanks!
Steps to reproduce
Try accessing contextual data using
_contentmentContentContext.GetCurrentContentId()
inside GetItems() of a custom data source.Expected result / actual result
Get current node.
Do you have Umbraco ModelsBuilder enabled?
What browsers are you seeing the problem on?
No response