We could go and get the latest video, then do another query to get a list of the latest videos. Instead of doing that, we could simply get the top ten latest videos and use the first one as our "hero" video in the middle. Let's do that:
1. Open up
index.cfm
and add the following code to get the latest published videos:<cf_layout> <cfset Videos = EntityLoad("Video", {status=1}, "uploadedAt DESC", {maxResults=10})> <cfset HeroVideo = Videos[1]> <cfoutput> <div id="content"> <h2>#HeroVideo.getTitle()# submitted by #HeroVideo.getUser().getUserName()#</h2> <cfvideoplayer video="videos/#HeroVideo.getFile()#.flv" width="600" height="338" preview="posters/#HeroVideo.getFile()#.jpg"> </div> <div id="sidebar"> <h2>Recent Videos</h2> <ul class="thumbList"> <cfloop array="#Videos#" index="video"> <li> <a href="play.cfm?id=#video.getID()#"><img src="thumbs/#video...