Widget with ContentType data filterd by current page slug

Topics: Writing modules, Writing themes
Jun 29, 2011 at 1:50 PM

Hi folks.

Tried hard to grasp the task myself but have tho give up...

Just take the classic example of Event ContentType turned into a widget and set with custom filters on some Aside Zone here http://orchardproject.net/docs/Creating-lists.ashx.

I need to implement very similar to this one but except the custom filtering I need a filter by current page slug.

That is say a specific Event should appear on the aside zone related to the curent page slug.

I really do not want to create a layer per a  page and put a new widget with an appropriate custom filter value.

Rather I'd like to make some sort of filtering just for this kind of a widget according to the ContentType filed say RalatedSlug and the current page slug.

Now simply cannot grasp where and how realize this filter.

Please any hint will be appreciated.

Coordinator
Jun 29, 2011 at 6:58 PM

Yes, if that event is related to the page, it doesn't make sense as a widget. Instead, you can dispatch the shape into a top-level zone from your own code. See the Buy From Amazon module for an example of something very similar.

http://orchardproject.net/gallery/List/Modules/Orchard.Module.Vandelay.BuyFromAmazon

http://weblogs.asp.net/bleroy/archive/2011/03/26/dispatching-orchard-shapes-to-arbitrary-zones.aspx

Jul 1, 2011 at 1:27 AM

Thank you ever so for your help.

Found one more thing

http://www.deepcode.co.uk/2011/06/real-world-orchard-cmspart-7finding.html

So I've realized exactly what I need.