A New Version of the Google Sitemap Provider Base
My first version of the Google Sitemap Provider for DotNetNuke was developed off the Base Sitemap Provider for any old ASP.NET website. This version collated all of the available Url's for a particular page based on the Page Url (ie, default.aspx?tabid=33&entryId=43).
While this worked OK, it was after my work on the Friendly Url Provider that I realised I wasn't really following the correct procedure for DotNetNuke modules with regards to determining the correct page. It used a separate regex for determining the current tab, and when you rewrite that Url to specifically exclude the tabId, well, it just stops working.
So back to the coding board. I have changed the way the base Google Sitemap provider calls down to any module specific providers which inherit from the base class. It now calls a function in any module-specific provider, with a method signature like this:
public override List SitePagesForTab(PortalAliasInfo portalAlias, TabInfo tab)
{
List sitePages = new List();
//logic to build all Urls (sitePage objects) for specific module here
return sitePages;
}
By passing in the PortalAliasInfo and TabInfo objects for the respective Portal and Tab, it saves a lot of messing around retrieving these objects.
Two new Providers
Along with the changes to the base class, I have written two new Module-Specific Sitemap Providers:
- iFinity Tagger Module Sitemap Provider This provider returns the listing of the Url's for the site Tag List, for each tag up to the specified maximum number. This enables search engines to find and index the content by the majority of Tags on the site, not just the ones that you may choose to show on the front page Tag Cloud. You need to install the iFinity Tagger module as well as this sitemap provider.
- Ventrian Articles Module Sitemap Provider When I first developed the sitemap provider Scott McCulloch discussed the building of a google-sitemap specific provider for this module. I did build one originally, but I think it had a few issues and I never really released it publicly. This is the second version of this Sitemap provider and will list out all the Url's for all pages of articles, as well as the Url's for each Category. Obvoiusly you'll need to have the Ventrian News Articles module.
As always, you can see the results in the iFinity Google sitemap.
Download the Code
The downloads are on the Free DotNetNuke Downloads page.
Other Links
iFinity Google Sitemap Providers Forum | Ventrian.com (Articles Sitemap Module)
If you'd like a sitemap provider developed for a specific custom module, please use the contact form to ask. I can usually reverse engineer a provider without actually seeing the source code.