I am using omega theme. I have installed contxtual tabs which simply removes the tabs from the nodes pages. But when we click on gear icon for contextual links it only showing edit panel. All other links are vanished.

Comments

mpotter’s picture

Contextual Tabs currently only works with themes based on Bootstrap (as mentioned on the project page). You'll need the Bootstrap javascript to get the drop-down menus.

Patches to convert this to using ctools drop-down menus rather than Bootstrap are welcome.

deanflory’s picture

Issue summary: View changes

Got all excited, then this. Booooo. :)
AdaptiveTheme custom theme here.
:(

The Javascript Tabs module I'm using currently doesn't have the guts to react to the side of the window and reverse the menu, making it ineffective for mobile usage.

*sigh* Is there no solution at all? I find it hard to believe there is no way to easily turn primary/secondary tabs into a superfish menu or something of the sort. My preference would be a Superfish menu using AdaptiveTheme's mobile menu adaptation with Contextual Tabs' ability to break out individual items as separate "main" menu items in the tabs menu.

A man can dream...

I saw on another issue and wanted to ask:
Does enabling twitter_bootstrap_ui make this work for other-than-Bootstrap themes?

mpotter’s picture

All Bootstrap is used for is the drop-down behavior. Seems like somebody out there in Drupal community land could convert this to using CTools drop-down js.

But yes, enabling the js portion of twitter_bootstrap_ui should be enough. I even thing there was a patch for that module that let you separately control adding the js vs the css.

deanflory’s picture

I tried simply enabling twitter_bootstrap_ui and contextual_tabs modules with my current AdaptiveTheme custom theme and it doesn't appear to do anything. The default tabs are still there and there is no trace of contextual_tabs on the page.

Here is the AdaptiveTheme custom subtheme page.tpl.php section pertaining to primary/secondary/action tabs:

<?php if ($primary_local_tasks || $secondary_local_tasks || $action_links): ?>
                  <div id="tasks">

                    <?php if ($primary_local_tasks): ?>
                      <ul class="tabs primary clearfix"><?php print render($primary_local_tasks); ?></ul>
                    <?php endif; ?>

                    <?php if ($secondary_local_tasks): ?>
                      <ul class="tabs secondary clearfix"><?php print render($secondary_local_tasks); ?></ul>
                    <?php endif; ?>

                    <?php if ($action_links = render($action_links)): ?>
                      <ul class="action-links clearfix"><?php print $action_links; ?></ul>
                    <?php endif; ?>

                  </div>
                <?php endif; ?>

Any advice on what needs to be changed? Since I was using the Javascript Tabs module previously, I had to alter this:
<ul class="tabs primary clearfix"><?php print render($primary_local_tasks); ?></ul>

To be:
<?php print $variables['tabs']; ?>

I tried that but all I got in place of the primary tabs was: "Array" text (without quotes)

I downloaded the Bootstrap theme (bootstrap-7.x-3.x-dev) and I searched it to find this in the region--content.tpl.php:
<?php print render($page['tabs']); ?>

I pasted it into my tpls to replace what was existing for primary tabs but nothing showed up: not "Array", nor tabs, nor Contextual Tabs. So I'm at a complete loss at how to get this to work now.

I even tried it with what looked like what was being rendered in the .module code but all that rendered was a UL bulleted list of the primary tabs items (Am I crazy to have just been happy that something showed up?) aligned to the right of the page, so close but the dropdown menu style isn't being applied:
<?php print $variables['primarytabs']; ?>

I also then tried this but it also resulted in just the text "Array" instead of tabs:
<?php print $variables['tabs']; ?>

mpotter’s picture

Since we haven't done any testing outside of Open Atrium, you might want to look at the code in OA Radix theme to see what it does in it's page.tpl.php template.

deanflory’s picture

Open Atrium Radix uses:
<?php if (!empty($tabs['#primary']) || !empty($tabs['#secondary'])): ?><div class="tabs main-tabs"><?php print render($tabs); ?></div><?php endif; ?>

Tried it, nothing shows up at all with AdaptiveTheme.

Done. No more time to waste on something not Drupal-friendly.

Using Local Tasks Blocks now:
https://www.drupal.org/project/local_tasks_blocks

Others might find Javascript Tabs to be a good fit but it has some issues with mobile and odd script behavior:
https://www.drupal.org/project/javascript_tabs

Better Jump Menu is simple and effective, but simple:
https://www.drupal.org/project/jump_menu