Developer forum

Forum » CMS - Standard features » Sitemap app not working

Sitemap app not working

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

I am using 9.4.18 ad for the life of me I can't get the Sitemap App to work. Is there a know bug with it?

 

I tried:

  • Using the default xslt template (within my design folder) with no sucess
  • Using a new baic chtml template too
  • Changing the content type of the page
  • I know I have pages set to display because I can get into /sitemap.xml and I get results
    funny thing is that the customer's third party SEO (very trusted partner) has strong feelings how this show be split up into 4 sitemaps with their how relevant information - so I really need to get this one under control.

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Pedersen
Reply

Sounds perfect. It is so last decade :-).

I have not seen that module in use for the past many many years.

But I would check if the pages have "Show in sitemap" set - and go to Settings, Control Panel, Sitemap and click the button "Enable "Show in sitemap" for all pages" to have it enabled everywhere...

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

I had done that with no results. Seems like the module does not render the template at all. No matter what I put there did not work.

 

I looked at the source and found the error though. This (legacy) module does not look into the Location of the template like other modules. The UI does load the (select) list of templates based on the design folder, but the module just renders the template if located unders Files/Templates/SitemapV2. This is a bug.

 

I guess the fact this is a legacy module answers why that is. I guess the next question is:

  • Will this module ever be refactored?
    • if yes, then it should be fixed and consider the future razor menus
    • if no, should be be considered deprecated? How can I build easy sitemaps that iterate through all products and subsections of a website for SEO/Webmaster purposes?

 

Best Regards,

Nuno Aguiar

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

And BTW I found the code here:

Dynamicweb9\06 - Dynamicweb Host\Dynamicweb\Dynamicweb-9.4\Dynamicweb\Frontend\LegacyModules\SitemapV2\SitemapV2.vb

Line 55: Dim path As String = "/files/templates/SitemapV2/" & Settings.Template

And then the path is never updated considering a Design path. 

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Hi Nuno,

It does work (in mysterious ways, maybe).

Try this...

  1. Create a layout template, e.g. /Files/Templates/Designs/MyDesign/MyLayout.cshtml
  2. Create a sitemap template, e.g. /Files/Templates/Designs/MyDesign/MyLayout/SitemapV2/sitemap.xslt.
    • The template must be an XSLT template.
    • The sitemap template needs to be placed in a subfolder named after your layout template, e.g. MyLayout.
  3. Create a page and select the layout created in step 1.
  4. Create a paragraph on that page, attach the Sitemap app and configure it to use the template created in step 2.
  5. View the page in front end and verify that your sitemap is displayed.

At least... it works on my machine ;)

Best regards,
Morten

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Morten,

 

That's "good" news and I can get it to work with your steps, but if I place the SitemapV2 folder in the root of my design, it does not work. Check this out

https://www.screencast.com/t/ld1pkY1fa

 

Although not in the video, I also tested by placing the SItemapV2 folder Designs and that did not work either. So it looks like the bug is afecting 2 out of the 4 possible locations a template can be placed in :)

 

Best Regards,

Nuno Aguiar

 
Nicolai Pedersen
Reply

Well you have a workaround. And being a totally dead feature as noone have spotted this yet, you have a choice now of us putting efforts into adding features into i.e. forms for editors or refactor this app. What is your preference. (yes, it is a trick question....:-)

NP

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Well... if we're playing this game... Web API methods or Razor Menus :D

 
Marie Louise Veigert
Reply

Hi Nicolai,

We are currently working on a customer, who needs to have this Sitemap.

But I would like to be sure, that the app doesn't die completly someday. Otherwise maybe you recommend another way to do it instead? :) 

 
Nicolai Pedersen
Reply

Hi Marie Louis

I Guarentee they do not need a sitemap - they might want it, but they do not need it! Sitemaps are from they early days of SEO in 2001 or so... :-).

Anyways - it lives until DW10 - then I will personally kill it.

Another approach is to call @RenderNavigation in a parapgraph template:

https://doc.dynamicweb.com/template-tags/introduction/helper-tags/rendernavigation

 
Marie Louise Veigert
Reply

Hah, thanks. You are probably right ;)

I'll try the other approach :)

 

You must be logged in to post in the forum