Video Sitemap XML

Hi all,

I have been using the [[!StercSeoSiteMap]] snippet to create sitemaps within all my sites and it works very well - thanks Sterc!

But - a customer has just asked me to create a video sitemap to help index all the video content on the site.
The videos on the site are distributed around various galleries.
All videos are embedded directly from youTube.

I can obviously create a manual sitemap, but this is A: time consuming, and B: will easily become out of sync if videos are changed/moved.

I just wondered how you guys handle video sitemaps within MODX?
Do you use an extra for it (I can’t find anything so far) or does it need to be hand-rolled?

Thanks in advance for any tips!

1 Like

I just thought, maybe i could build the sitemap using a getResources call based on the TV that I use for the youtube code?

1 Like

Ooh, now you are thinking!

So this is what i have done in case anyone is interested!

I have a new resource which is an xml file.
It has an empty template, but within the content field (not richtext) I have:

<urlset xmlns="" xmlns:video="">

So this looks for all resources which have the TV galleryVideo completed.

Then the TPL is this:

<video:player_loc allow_embed="yes">[[+tv.galleryVideo]]?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1&amp;autoplay=1
<video:tag>West Lodge Park</video:tag>
<video:tag>Country House Hotel</video:tag>
<video:category>People &amp; Blogs</video:category>

This creates a sitemap.xml with JUST resources that contain a youtube video. The only thing I’m not 100% sure about is that the syntax for the sitemap is correct - but I think it is?

1 Like

Had confirmation from an SEO expert that the syntax I have used for the video sitemap is correct, so we’re good to go. I’ll leave this all here in case others have the same question - it was a simple solution in the end!


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.