Postponed
Project:
XML sitemap
Version:
7.x-2.x-dev
Component:
xmlsitemap.module
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
23 Jun 2009 at 12:02 UTC
Updated:
12 Nov 2012 at 13:29 UTC
Jump to comment: Most recent
Comments
Comment #1
dave reidThere 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.
Comment #2
avpadernoAs 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.
Comment #3
DrupalKing commentedViews 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.
Comment #4
dwightaspinwall commentedThen perhaps you should contribute a module to do just that. ;-)
Comment #5
dave reidOne 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.
Comment #6
avpadernoI 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.
Comment #7
dave reidMarking as postponed for now.
Comment #8
vacilando commentedMuch interested - even if only for specific kind of views.
Comment #9
YK85 commentedsubscribing
Comment #10
xxparanormalxx commentedsubscribing
Comment #11
tigron commentedSubscribing
Comment #12
Andrew Gorokhovets commentedSubscribing
Comment #13
manoloka commentedsubscribing
Comment #14
manoloka commentedbut views won't let you add a menu if the path has a argument %
???
Comment #15
treksler commentedIsn't this the definition of a site map? "Get all possible paths" OK, so there's no good way to do it. Well, then that's a design flaw with views or XML site map and it should be fixed/redesigned so that a site map is possible.
Comment #16
Anonymous (not verified) commentedWhile this request is being contemplated, there is the xmlsitemap_custom module you can use to add URL that xmlsitemap doesn't automatically get. The custom module exists just for this reason.
Comment #17
sgdavis commentedWhat about adding an option where the user can at least specify what type of an argument should be provided? For example, most of my views all take the argument of a Node ID so you could query the node table for all available node IDs. Even if you just queried for the largest and went from 1-max, I would imagine most Views wouldn't fail as usually they are designed to operate with some fallback argument. I could imagine supplying a minimal number of possibilities would at least be a great start. I.e., node ID, user ID, date, custom specified list (could be user supplied in a textbox, one item per line), etc.
Anyway, I would be very interested in this as it is incredibly annoying to have to add a menu item or custom xml sitemap entry every time that I add a node.
Comment #18
Anonymous (not verified) commentedRe: #17
Are the node and view links both available to the anonymous user? Having the same content presented with differing URLs is a big SEO no no.
Comment #19
aheredia commentedI've some views with arguments of type %. I've made a first approach trying to include the dynamics urls of the view into the sitemap.
The idea is include the url when the user visit the view page using the arguments of the view using the hook_page_alter(&$page). Here is the initial code:
Seems to work
Comment #20
Anonymous (not verified) commentedThere is no patch file so nothing to review.
You shouldn't be setting the id, it is auto incremented on the save.
Comment #21
aheredia commentedYou shouldn't be setting the id, it is auto incremented on the save.The id field is not an autoincremental field. The primary key of the table is composed by id and type field so i thought i should increment the id by code.
I've made same changes to code to control the path doesn't exist on the table yet.
Comment #22
Anonymous (not verified) commentedShows what happens when you guess at how it is implemented, sorry for the miss instruction.
Now you need to provide a proper patch. See http://drupal.org/node/707484 if you need guidance on doing that.
Comment #23
aheredia commentedWhat would be a better approach?
Create a independent Submodule.
Or
Insert code in existing one, xmlsitemap_custom for example.
Comment #24
Anonymous (not verified) commentedSince the views module will be delivered as part of core in D8 I think your change makes sense in xmlsitemap_node. Otherwise it will be another module named xmlsitemap_views but is it worth that? Dave Reid, what is your advise on this question?