volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

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?

 

cheers

#50635
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;

    

    

#60849
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.

#62013
Oct 10, 2012 10:57
error 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.