Display Link/Description of Latest YouTube Video


This code displays the latest YouTube video posted to any account. Because the YouTube RSS feed makes extensive use of tables and inline styles, we strip those out before displaying.


#set($rssTotal = 1)

## Replace "OklahomaChristian" with your own YouTube user name
#foreach($content in $list)
	<h3><a href="$!">$!content.title</a></h3>
	#set($content.description = $content.description.replaceAll('(<\/?table[^>]*>)|(<\/?tbody[^>]*>)|(<\/?tr[^>]*>)|(<\/?td[^>]*>)|(style="[^"]*")',''))

Have you created code you'd like to share with the dotCMS community?

Share your code Become a Contributor