Hi im trying to figure out how to get a contentblocks parent which is a layoutblock. i need to get the name of that layoutblock but im having trouble finding a getparent method in extensionpagedata. is there a way to get the layoutblock name which the contentblock is contained in?
You can simply use Parent property of your control used for content function. First parent will be a content area of layout, next parent - layout itself:
// Content area of layout
var contentArea = Parent as ExtensionContentArea;
// Your layout function, don't forget to check for null
var layout = contentArea.Parent as MyLayoutFunction;
This is not the case hen it is creating or reloading the fuction. It that case the dropit.plugin.extension.ui.edit.factory.reloadcontentfunction en createcontentfunction have no parent.