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 |
Jump to:
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
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
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
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
Then perhaps you should contribute a module to do just that. ;-)
#5
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
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
Marking as postponed for now.