Hi,

first of all I want to say thanks for this awesome and very useful module!

And, as there always is, there's something to make it even better! ;-) Currently the module always shows all the tabs and their associated blocks. It would be handy to have the tabs take the visibility settings of the block they show. So that a tab would show up only to authenticated users and on the front page because the block's visibility setting say so.

Thanks again for this module!

Comments

pasqualle’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

I don't understand this request
1. the quicktabs block accepts block's visibility setting, so it does not show up every time
2. if you want to control tabpage visibility then this issue will be a duplicate of #272084: Tabpage visibility settings

giorgosk’s picture

A think a simple scenario would be the following

insert the Login Block as part of a tab
the anonymous user sees it as it should

but after he/she logs in the login tab is still there
meanwhile the login block has no content
resulting in an TAB WITH EMPTY CONTENT

thus visibility settings and/or block visibility compliance
would be very much welcomed in this project

giorgosk’s picture

Status: Postponed (maintainer needs more info) » Active

Hope the previous makes it more clear

pasqualle’s picture

The tab content can be empty from various reasons. If block is the tab content then the block visibility is only one of the reasons. The login block content has this condition:

(!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))

This is not a visibility setting it is a hard coded condition in the login block.

To know that the tab content (like the login block) is empty then it is required to load that content first and check. This could work with non-ajax quicktabs but it is in contrast with ajax quicktabs, where you do not want to load anything unless you clicked on the tab. Hiding the tab after you clicked on it and found that it is empty, is not a nice functionality..

So this needs a serious rethink about how could this be achieved, without making it worse as it is..

pasqualle’s picture

Status: Active » Closed (duplicate)

The block visibility setting will not be considered as tabpage visibility, that does not make sense. Block visibility applies only when a block is displayed in theme region, should not be used for anything else..

Marking as duplicate of
#292150: Hide empty tabs
#272084: Tabpage visibility settings

rc2020’s picture

Replying to #1, "the quicktabs block accepts block's visibility setting, so it does not show up every time"

This does not seem to be true in my case. On block visibility setting (a view, with block display), the block visibility setting does not seem to be respected.

My php code is return FALSE; and

global $user;
if ($user->uid === 1) {
return TRUE;
else {
return FALSE;
}

With block visibility set as such for each block in admin/build/block, they still show up in quicktabs. Is there something I am doing wrong? Is there a switch to respect block visibility settings that I missed?

I'm trying to have quicktabs respect visibility settings.

Thanks!

pasqualle’s picture

with "quicktabs block" I mean the entire quicktab block, not the blocks inside quicktab

the block visibility setting is not used for blocks inside the quicktab.. that is by design..

rc2020’s picture

Is there any way to only show the quicktab based on some type of access rule or snippet, in any capacity?

Please let me know.

Thanks!

pasqualle’s picture

the only way for now is: #332895: render quicktab programatically
and I am planning to add #292150: Hide empty tabs, which might be useful in other cases..