0

I have a content type event with content name of the event, event image, a relatioship to organizer another relatioship to participant and another relationship to self event that i call programs. Now I want to make a view which return me a datasource json like

{   
    date:"10/10/2017"
    event:[
        {
            img:"image",
            description:"description",
            date:"date complet",
            program:[
                {
                    title:"titre",
                    description:"description",
                    date:"",
                },
                {
                    title:"titre",
                    description:"description",
                    date:"",
                }
            ],
            organizer:[
                {
                    name:"chis",
                    description:"description"
                },
                {
                    name:"chis1",
                    description:"description"
                }
            ],
            participant:[
                {
                    name:"zina lacina",
                    titre:"consultant"
                }
            ]
        }
    ]
}

The result is grouping by the date.

0

Try the Views Field View module. It gives you exactly what you need. Just add a view in your view wherever you have 1:n relationships. Setup views for program, organizer and participant and add a contextual filter for the event.

The result will be one event appearing once in your view.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.