sybru wrote:
Is it possible to add fields to dnn's core xml sitemap? We'd like to add fields for video according to google's specs as outlined here:
https://support.google.com/webmasters/answer/80472?hl=en
I'm not sure if the sitemap itself is extensible. There are options to create providers for the sitemap, to get URLs into the sitemap from custom URLs, but I don't know that you can pass additional info over to it for other attributes.
public override List<SitemapUrl> GetUrls(int portalId, DotNetNuke.Entities.Portals.PortalSettings ps, string version)
{
var listOfUrls = new List<SitemapUrl>();
foreach (var a in Article.GetAllArticlesList(portalId))
{
var pageUrl = new SitemapUrl
{
Url = Utility.GetItemLinkUrl(a.ItemId, portalId),
Priority = (float)0.5,
LastModified = Convert.ToDateTime(a.LastUpdated),
ChangeFrequency = SitemapChangeFrequency.Daily
};
listOfUrls.Add(pageUrl);
}
return listOfUrls;
}