Try our conversational search powered by Generative AI!

Get extensions parent extension!?


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?



May 05, 2011 17:07

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;



Edited, Aug 28, 2012 13:40

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.

Oct 10, 2012 10:57
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.