I want to use views to add tabs to nodes and user accounts (anywhere really). I have been unsuccessful setting up views to work with wildcard URLs and contextual filters.

Is there a procedure to

1. add a view tab to a node?
2. add a view tab to a user?

thanks

Comments

laurencefass created an issue. See original summary.

jwkovell’s picture

I've found views tabs to be very fragile when not used in a vanilla view. They're very dependent on URL structure to work.

For example. modules like taxonomy Views Integrator, will completely scrap tabs from an embedded view. Views with contextual variables or any variation that alters the URL may break your tabs or at least cause them to act unpredictably.

Have you tried getting around the issue by styling a menu into tabs? I found that the easiest solution.

I haven't tested this thoroughly, but the Block Tabs contrib module looks promising.

Syntapse’s picture

... i thought i was covering the most vanilla cases possible. really this doesn't work?

jwkovell’s picture

Unfortunately, not in my experience.

The path of a parent item will always be the same path with the last part left off. i.e, if the path to this view is foo/bar/baz

This reduces what you can do quite a bit. I believe I've made views in the past where conditional filters were applied in the portion of the path that was shared between all tabs. I could not, however, have each tab pass a different conditional filter value.

But, I’m always happy to be proven wrong - particularly when it means doing something a better way.

I’ll be watching this thread with interest for any other solutions.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

cilefen’s picture

Status: Active » Closed (outdated)

I am closing this support request because there have been no recent comments.

The Drupal Core issue queue is not the ideal place for support requests. Consider other sources of support.