Hello,
Is it possible to create URLs for each tab with only a fragment (#)?
Example:
www.mysite.com/node/89 -> tab 1
www.mysite.com/node/89#name_of_tab2 -> tab 2
www.mysite.com/node/89#name_of_tab3 -> tab 3
My current code in my node:
<?php
$tabs['presentation'] = array(
'title' => t('Presentation'),
'type' => 'block',
'bid' => 'modele_2r_delta_modele_2r_presentation_block',
'hide_title' => TRUE,
);
$tabs['fiche_technique'] = array(
'title' => t('Fiche technique'),
'type' => 'block',
'bid' => 'modele_2r_delta_modele_2r_fiche_technique_block',
'hide_title' => TRUE,
);
$tabs['commentaires'] = array(
'title' => t('Commentaire'),
'type' => 'view',
'vid' => 'comments',
'display' => 'block_2',
'args' => '%1',
);
$quicktabs['qtid'] = 'modele-2r-id';
$quicktabs['tabs'] = $tabs;
$quicktabs['style'] = 'Excel';
$quicktabs['ajax'] = FALSE;
print theme('quicktabs', $quicktabs);
?>
Thank you for your help.
Comments
Comment #1
pasqualleCurrently it is not possible. I always wanted to add this setting to QT, but did not have the time to implement it.
The quicktab will not work when javascript is disabled in the browser, but many users would prefer it anyway.
If someone would like to jump on this feature:
- in theme_quicktabs_tabs() the
part needs to be changed.
Comment #2
Clément commentedThank you very much,
I found this function I changed.
Before:
After:
Now the url works.
It remains just one last (big) problem: When I click on a tab, the tab opens without changing the URL of the page. How to enable tabs with the url? Thank you.
Comment #3
pasqualleyes, that is the main functionality of the module. You can see more content without leaving the page (without page reload).
Comment #4
netw3rker commented