Custom module with child module
I am trying to create a custom module that has a child module. On the display side i want to do a list of the modules type with each of their children under them on the same page. I dont want users to have to click each parent to see all the children.
Say you have a list of events. The parent would be the months and the children would be the events happening in that month. Im not sure if this is even possible.
Hi Ian,
That is not the way the default widgets of the Dynamic Modules are working.
If you want to achieve such functionality, you would have to create your own widget and load data and the related data through the API.
Let me know if you need help with that?
Kind regards,
Daniel
so i cant get it to display parent and child all in one? I mean the Nav tool does it.
Dear Ian
If there are not to many module types you could drag multiple widget to the page and filter them. Sorry some hacky way to do it.
www.marktold.com/screencast/sf_child_module.swf
I use this in a scenario where I have a discription of a course (master) and the course dates (child) in a module.
Now on the page I drag my course widget and filter it and apply the desired templates.
Maybe if you have only a view top level and they don't have to be dynamic this could be a dirty workaround out of the box.
In your scenario you would have to drag 12 events widgets to the page and filter them by title (month for example) Of course this would be the same in a year. If you want Oct 13 - Oct 14 (next 12 month) then you will go a whole different route and take Daniels advice.
Markus
Markus
I only need the one view. another scenario that im looking to use this is with a custom module that displays links to pdfs. the parent module will categorize them by type...tops...bottoms...accessories...etc. the child module will be the image of the template...the link to the template and the name. i just need one long list of everything but with the child under the parent. can i not bring the child data into the parent template?
Dear ian
Can't you just use the list module?
Markus
the list module didnt really work 100% like i wanted to i may just program it. just trying not to. also with the events module im going to call races...one day we want it to list all of the races by month and when you search an area then the list disappears and a map showing the races in the area shows.
Hello guys,
This functionality can be achieved with a few lines of code. Here is what I used to filter them by month:
private List<
Telerik.Sitefinity.Events.Model.Event
> GetEvents()
DateTime date1 = new DateTime(2013, 10, 21);
EventsManager librariesManager = EventsManager.GetManager();
return librariesManager.GetEvents().Where(i => i.EventStart > date1 && i.Status == ContentLifecycleStatus.Live).ToList();