Sub-module for views

nevries - June 23, 2009 - 12:02
Project:XML sitemap
Version:6.x-2.x-dev
Component:xmlsitemap.module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed
Description

Is there a proper possibilty to add urls of view sites to the generated sitemap? I switched from drupal 5 to 6, using the powerful views module now. The views I use change not very often, so it would be great to have them in the sitemap. Are there plans to write something like a xmlsitemap_views module?
By the way, view urls are also not included when using the xmlsitemap_menu module and having them as primary links.

The hack I use is to manually type them into the custom module - not very elegant nor flexible.

#1

Dave Reid - June 23, 2009 - 14:46

There aren't any plans at the moment to have a views-only submodule since there are the two ways that you have already described here. If you added the view to your primary links, you'd probably have to make sure that cron runs at least once afterwards for the change to be picked up. Also, you have to make sure that your view is accessible to anonymous users as well. Otherwise the link to the view is not going to be included in the sitemap.

#2

KiamLaLuno - June 23, 2009 - 17:32

The hack I use is to manually type them into the custom module - not very elegant nor flexible.

As the URL associated with a view doesn't normally change (if the URL is not using "%" replacements), I would think that using xmlsitemap_custom.module is enough; the few times you change the view URL, you can also change the URL reported to XML sitemap custom.

#3

Hochmania - June 26, 2009 - 19:03

Views generated pages need to be included because it's absurd that by default they wouldn't be included in the sitemap. I don't know about you all, but my Views pages are a major part of my site. Having to add them manually with the custom module is additional work I shouldn't have to do.

#4

dwightaspinwall - June 30, 2009 - 14:01

Then perhaps you should contribute a module to do just that. ;-)

#5

Dave Reid - June 30, 2009 - 21:21

One of the major problems with adding an xmlsitemap_views submodule is that a lot of views have arguments (Taxonomy views) there's not a good way to do something like get-all-possible-paths-for-this-view. If there was, writing that kind of module would be a little easier. The easiest way to do so is to create a menu at admin/build/menus called "xmlsitemap" and in your Views editing, add the view to the menu. Then, make sure you have the xmlsitemap_menu module enabled and make sure that the xmlsitemap menu is included in the sitemap.

#6

KiamLaLuno - June 30, 2009 - 21:33

I agree with Dave; it's not possible to handle views in a specific way. Even the approach followed by Meta tags is not correct, as it's not able to handle all the displays used by a view.

#7

Dave Reid - July 1, 2009 - 15:54
Title:Views» Sub-module for views
Status:active» postponed

Marking as postponed for now.

 
 

Drupal is a registered trademark of Dries Buytaert.