This project is read-only.

Container Id and Containable.Container Id

Topics: Customizing Orchard, Writing modules
Nov 28, 2012 at 5:26 AM

Hi there,

I have created a content type named 'ContainerObject' with part 'Container', and created few content item of that type.

Now I use the 'Container Widget' to add a widget into zone, and I have to select which content item (that have 'Container' part - here are my items above) to be shown.

So, when Displaying, the container widget will show that content item, and I would like to know how to get the id of that content item in order to add to a HTML attribute. I have checked the code of ContainerWidgetPart and ContainablePart but I was not able to get ContainerId.

I also want to know how to get the Container Id of a Containable part item. I have a widget that with 'ContainablePart' and I need to get that id out.

Can you guys tell me how I can do that ?

Many many thanks for your help.

Nov 28, 2012 at 7:06 AM


Nov 28, 2012 at 7:07 AM

Thanks mate, I work it out .