I created a patch to allow Views Bonus Pack to export a Google News Sitemap. This provides some flexibility over the Google News sitemap module because this patch uses the Labels from the fields in Views as the attribute names, similar to this ICS file format patch. As a result, this patch provides a way of supporting the optional tags, such as <access>, <genres>, <keywords>, and/or <stock_tickers>.

A few tips for using this method to generate the feed:

  • Set Items to display to 1000
  • For the <publication_date> attribute, use the following Custom format: Y-m-d\TH:i:s+00:00
  • The last (ie, bottom-most) field designated in the view will be used as the <loc> attribute.
  • Add a sort criteria of Node: Post date set to Descending
  • Be sure to add a filter with Node: Published set to Yes
  • Add a filter with Node: Post date set to Is greater than or equal to…An offset… of -2 days

Or import the attached example view as a starting point.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stockmaster1’s picture

Hi Matt, this is exactly what I'm looking for. Question for you, I've never installed a drupal patch before - can you point me in the right direction? Thanks

Matt V.’s picture

stockmaster1, the Verson control tab on the module's project page includes instructions on how to apply patches.

I'd love to hear any feedback you may have, once you get a chance to try it out.

stockmaster1’s picture

Hi Matt,

I've been pulling my hair out all weekend trying to figure out how to do this, downloaded smartgit, cygwin, but I'm not a web developer and none of it makes any sense to me. If there was just a way to upload the patched module that would be awesome. Otherwise it seems that I may be out of luck :(

Matt V.’s picture

FileSize
644.54 KB

stockmaster1, give the attached (patched) version a try.

In case it might help later, I recommend checking out the Quickstart project, to get a jump start on developing with Drupal. It includes the tools you need to checkout and patch, plus there are video tutorials to help you along the way.

Matt V.’s picture

FileSize
317.79 KB

Oops, I made a mistake creating the previous zip, accidentally including the files twice. Please try this one instead.

neclimdul’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)