Anyone know of an easy (or somewhat easy) way to embed a youtube video in a content slider?
Official response from Jason Meer
You won't be able to do this with a NationBuilder featured content slider, but we suggest AnythingSlider, a jQuery plugin that can accept any HTML content. For more on incorporating JavaScript and jQuery into your NationBuilder site, go here.
Share this post
Showing 5 reactions
Sign in with
https://medium.com/@codenation/how-to-include-a-feature-video-in-your-nationbuilder-feature-slider-4fc9852a2322#.hhg7jq3fk
In the features.html file, you just need to target the slider # that you want to display the video with a conditional statement (I’d say the easiest is the first or last slider) using forloop index #/ or forloop first/last (more info here: http://nationbuilder.com/liquid_basics).
In the code, you want to allow for a dynamic video iframe so that you/the customer can simply input the video ID into the “Label” area for the featured content slider settings. This will make it so that no one has to dig into the code to switch out the video.
For example, a youtube video embed might look like this: