Problem/Motivation
Search engine crawlers can use the sort links provided in views table display headers.
This may not be a desired behavior because it adds useless pages to index.
Proposed resolution
Add option per field in views table format options, if the field/column is sortable, display an additional checkbox to allow to add an attribute 'rel="nofollow"' to sort link.
OR
Force this attribute on all sortable columns during the preparation of those links.
Remaining tasks
- Decide of a solution
- Make a patch
- Make tests
User interface changes
Additional option in views table format options.
API changes
None.
Data model changes
Update views table format config schema.
Release notes snippet
Comments
Comment #2
lendudeI'm not a fan of adding more settings to the UI, especially to the table style settings dialog which is already way too crowded.
Is this really something that you would need to control at the view level? Wouldn't it be easier to just add it to a custom views-view-table.html.twig so that it is set for all your views?
Since SEO is so bound to Google's whims, I'm loath to add something like this that could lose its relevancy quickly (@see rel=prev/next), while we would be forced to maintain it moving forward (adding stuff is easy, maintaining and removing stuff is hard).
Comment #3
grimreaperHello,
Thanks @Lendude for your feedbacks.
Yes it can be made in a custom twig template, but the idea was to have something generic and make a contribution in core so anyone can benefit from that.
I understand your concerns and if you are not ok with this feature request, no problem to close it and I will make the code in my custom project.
Comment #5
grimreaperHello,
I guess that this issue is no more relevant due to https://www.drupal.org/node/3092185 and #2999696: Add rel="nofollow" to table sort headers.