New Release of DotNetNuke Google Sitemap Providers
Feb
11
Written by:
Monday, February 11, 2008 11:31 AM
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.
3 comment(s) so far...
Re: New Release of DotNetNuke Google Sitemap Providers
Bruce,
great job especially the ventrian news article provider :) I've just downloaded it.
Do you have any plans to release a provider for the ventrian property agent module?
By Emil on
Sunday, February 24, 2008 11:53 AM
|
Re: New Release of DotNetNuke Google Sitemap Providers
@emil
Thanks - although I have been told there is a newer version of the News Articles module out which doesn't work with the current version of the Sitemap provider. If you've got a later version which uses the Ventrian.NewsArticles.dll and not the DnnForge.NewsArticles.dll, I don't think the download will work for you. I will be updating at some point when I get a copy of the newer code from Ventrian.
As for the Property Agent, currently I don't have plans to develop a provider for the Property Agent module, but if enough people ask... well I might be convinced!
By host on
Sunday, February 24, 2008 11:57 AM
|
Re: New Release of DotNetNuke Google Sitemap Providers
Bruce,
this was the first thing I noticed after looking at the source so I updated the reference to the newer Ventrian.NewsArticles.dll and I have to tell you it compiles OK. I haven't been able to test it because at present I do not use the module and I need to setup a test environment first. I was interested in the code to see how easy it would be to create a PropertyAgent provider.
By Emil on
Monday, February 25, 2008 8:23 AM
|