Widget ID from within Widget's Part Driver Class

Topics: Customizing Orchard
Jan 18, 2012 at 12:01 AM

Hi there,

I would like to dynamically obtain the widget id for use within the same widget's part driver possibly through its contentpart. I am currently using the iwidgetservice which basically searches for the widgetpart matching the widget's displayname. I doubt that my technique will scale well. So I am wondering, if possible, how I can pull it straight from the widget's content part.

Any advice will be greatly appreciated.


Jan 18, 2012 at 12:09 AM

Within a part driver, you can just go part.ContentItem.Id ...

Jan 18, 2012 at 1:26 PM

Thanks randompete. Works well.

This message (including any files transmitted with it) may contain confidential and/or proprietary information, is the property of Interactive Data Corporation and/or its subsidiaries, and is directed only to the addressee(s). If you are not the designated recipient or have reason to believe you received this message in error, please delete this message from your system and notify the sender immediately. An unintended recipient's disclosure, copying, distribution, or use of this message or any attachments is prohibited and may be unlawful.