I am using Media:youtube in a content type and the field in which I embed youtube videos might have multiple values. I am trying to put those multiple youtube videos belonging to a node in tabs dynamically.

Eg: I have a node created with title: example of tabs underneath that I have embedded two youtube videos in the node output should be in tabs with part1 as first horizontal tab and part-2 as second horizontal tab. Part1|part2

with part1 loaded first and i should click part2 for second video

When there are 3 videos loaded in a node, then I should have like part1|part2|part3

I think using Display Suite with a add code field which i think should have a forloop with delta values of video will solve the purpose.I have no php coding knowledge

Can someone please help me to achieve this.


Maybe you use could use the Field Collection Tab formatter module with Field collection?

Here are some more details about these modules (quotes included are from their project pages):

... provides a field formatter that allows you to output a multi value field collection field as a tabset, with one tab per field collection item.

... Provides a field-collection field, to which any number of fields can be attached. A field collection is internally represented as an entity, which is embedded in the host entity. Thus, if desired field collections may be viewed and edited separately too.

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.