Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Sitemap CustomizationSitemap Customization
Previous
 
Next
New Post
6/27/2016 7:40 PM
 

Howdy,

I'm using DNN 7.04.01 and i have need to heavily customize my sitemap 

I have need to add in results from a stored procedure for links off of an other site , but i'm not sure where to begin.  i believe i need to override/extemd the existing sitemap module 

 

I have the full source downloaded and i'm looking at SiteMapbuilder.cs  in the services / sitemap project. 

 

as a horrible plan "B" i can put in a redirect in the web.config to send sitemap.aspx to some other url  say gsitemap.aspx for example. i don't really like that solution though it would technically work. 

 
New Post
6/28/2016 8:59 AM
 
you would need to create a sitemap provider for the additional content, please check out the wiki (http://www.dnnsoftware.com/wiki/sitem...) for details.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
6/29/2016 12:07 PM
 
Thanks :)
 
New Post
7/24/2016 9:50 PM
 
Don't we just love extensible? Not surprised. So many modules implement their own sitemap provider.
 
New Post
7/27/2016 1:29 PM
 
Extensible is a great thing.

I'm having no luck adding in a new sitemap provider. :(

What I'm trying to accomplish is to read from a database and add the pages i find in there into the DotNetNuke sitemap , but for only 1 of my portals, the company i work for uses DNN for our mobile site and our blog portion of our classic site, but the classic site is in a different CMS system. (i have modified their code base to read the pages from the DNN DB and add them to that sitemap)

So now i just need to modify the blog site map to contain entries i read from a DB stored procedure.

I've tested the stored procedure with the DotNetNuke login and it works as expected.


I have the feeling i did a few steps wrong

I created a new project Called Mycompany.MoModufle.Components.Provider.SiteMap

in this i created SiteMap.cs


using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Data.SqlClient;

using DotNetNuke.Services.Sitemap;
using MyCompany.MyModule;

using DotNetNuke.Common;
using DotNetNuke.Common.Internal;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Portals;
using DotNetNuke.Entities.Tabs;
using DotNetNuke.Security.Permissions;

namespace MyCompany.MyModule.Components.Providers
{
public class SiteMap : SitemapProvider
{

#region Public Methods

public override List GetUrls(int portalID, PortalSettings ps, string version)
{
var colEntries = new List();
DataTable RCMSUrls = new DataTable();
String RCMSUrl = ConfigurationManager.AppSettings["RCMSUrl"].ToString();

try {
SqlConnection sqlcon = new SqlConnection(ConfigurationManager.ConnectionStrings["SiteSqlServer"].ConnectionString);
sqlcon.Open();
SqlCommand command = new SqlCommand("RCMS.dbo.GetSitemapPages", sqlcon);
command.CommandType = CommandType.StoredProcedure;

SqlDataAdapter adapt = new SqlDataAdapter(command);

DataTable resultstable = new DataTable();

adapt.Fill(RCMSUrls);

SitemapUrl siteMapUrl;
// Loop through RCMSUrls sitemapDataTable adding them to the list of sitemapurls
foreach (DataRow dr in RCMSUrls.Rows)
{
siteMapUrl = new SitemapUrl();

siteMapUrl.Url = RCMSUrl + dr[1].ToString() + ".aspx";
siteMapUrl.LastModified = (DateTime)dr[2];
siteMapUrl.Priority = (float).5;
colEntries.Add(siteMapUrl);
}
}
catch (Exception ex)
{

}

SitemapUrl siteMapUrl2 = new SitemapUrl();
siteMapUrl2.Url = "http://www.google.com/no.aspx";
siteMapUrl2.LastModified = Convert.ToDateTime("01/20/2016 12:00 pm");
siteMapUrl2.Priority = (float).5;
colEntries.Add(siteMapUrl2);
//var cntentry = new CustomSiteMap();
//cntentry.GetPublishedPortalEntries(portalID);


return colEntries;
}

#endregion

}
}


this compiled into
E:\svn\CorpSite\DNN\DotNetNuke.Modules.CustomSiteMap\bin\MyCompany.MyModule.Components.Providers.SiteMap.dll

then i have modified my web.config as follows :










i have placed the compiled DLL into \D:\Inetpub\m.website\DesktopModules\MyCompany\Components\Providers\


I cleared the cache, restarted the app, cleared the sitemap cache, deleted the site map xmls, but my new sitemap provider just doesn't show up on the Admin >> Search Engine Site Map >. clear cache, but still my new sitemap provider doesn't show up..

??

i also tried deleting the sitemap.xmls off the server as well but still nothing.

one more note the Guide i used is for DNN 5.x
http://www.dnnsoftware.com/community-...

hopefully someone can spot what i did wrong.

thanks for your help!

:)



 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Sitemap CustomizationSitemap Customization


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out