Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
in issue #354867: SEO: Add Canonical Tags to Quicktab Pages there is a feature request about not supporting browsers without javascript, which would solve the SEO problem.
here is the required code change:
/plugins/QuickQuicktabs.inc
function construct_link_options
...
$query = array();
if (variable_get('quicktabs_support_no_js', TRUE) {
// Need to construct the correct querystring for the tab links.
$query = drupal_get_query_parameters(NULL, array("qt-$qt_name", 'q', 'page'));
$query["qt-{$qt_name}"] = $tabkey;
}
...
there should be an "admin/structure/quicktabs/settings" page where this new variable quicktabs_support_no_js could be changed. Simple system_settings_form, something like:
function quicktabs_admin_settings() {
$form['quicktabs_support_no_js'] = array(
'#type' => 'checkbox',
'#title' => t('Support browsers without JavaScript'),
'#description' => t('Nice explanation what happens when this checkbox is enabled/disabled. SEO problem, etc..'),
'#default_value' => variable_get('quicktabs_support_no_js', TRUE),
);
return system_settings_form($form);
}
Comment | File | Size | Author |
---|---|---|---|
#9 | interdiff-1438412-8-9.txt | 622 bytes | hanoii |
#9 | quicktabs-support_no_js-1438412-9.patch | 3.84 KB | hanoii |
|
Comments
Comment #1
laughnanComment #2
laughnanSee attached for attempt at a patch.
Feedback is appreciated.
::Alex
Comment #3
laughnanComment #3.0
laughnanfix typo
Comment #4
hanoiiComment #5
hanoiiComment #6
hanoiiAfter all of these years, we also needed this, and I kind of like this approach at least for a sensible chance of getting it acccepted, although I don't think it ever will.
Just re-rolled the patch that applies to latest dev and 3.6, and I added to it some improvement on the fragment, so that it's added to the address bar and the link can be shared with a specific tab opened.
Comment #7
hanoiiRefactored it very slightly so that it applies to both dev and 3.6.
Comment #8
hanoiiAdding uninstall.
Comment #9
hanoiiChanging the admin description for something less confusing.