I'm a teacher and my class students made about 30 videos to learn/remember school stuff. I'd like to display all these videos on the class website.
I made a "video" datatype in which I entered all videos Youtube ID (like -j_JdG6s8hk for instance). Now that all my Youtube ID are entered in my content section in the "video" datatype, I'd like to create a macro who will display all these video on 1 page.
So, would like to enter the parent node ID of my video, then the macro will look for child nodes and display all child videos. For now, it only display one video.
I don't see any iteration in your xslt, so you can only have a single vid on your page right now, I guess you'll have to introduce a for-each in your script. And, currently your variable node will only hold a single node (as you have a position() = 1 constraint)
Display a list of video by Youtube ID
Hi all,
I'm a teacher and my class students made about 30 videos to learn/remember school stuff. I'd like to display all these videos on the class website.
I made a "video" datatype in which I entered all videos Youtube ID (like -j_JdG6s8hk for instance). Now that all my Youtube ID are entered in my content section in the "video" datatype, I'd like to create a macro who will display all these video on 1 page.
So, would like to enter the parent node ID of my video, then the macro will look for child nodes and display all child videos. For now, it only display one video.
Profiterole,
I don't see any iteration in your xslt, so you can only have a single vid on your page right now, I guess you'll have to introduce a for-each in your script. And, currently your variable node will only hold a single node (as you have a position() = 1 constraint)
Hope this helps.
Regards,
/Dirk
Ok, thank you! Now I understand :)
is this code works in Umbraco 4.5.2?
Hi Ridi,
No, the code does not work i 4.5.2 unless you are using the old XSLT Schema.
The first thing you need to change is this
to
You also have to change
But right now i can't remember how to write data["alias = 'youtube_id'] in the new XSLT Schema
But i'm sure you can google your way to it :)
best regards,
Hundebol
is working on a reply...