Questions related to block configuration page where checkboxes and configuration page let you customize the visibility of the block.

learn more… | top users | synonyms

0
votes
2answers
25 views

Display Blocks depending on the logged in user?

How am I going to display blocks depending on the logged in user? Let's say I have a Block1 and Block2. Whenever user1 is logged in, he should only see block 1. Same goes for user2, seing only ...
0
votes
1answer
11 views

Controlling Drupal blocks in Domain access

I am using Drupal 7 version for my website. I installed Domain access module for maintaining the sub domains. My situation is that the slideshow block (using Views module) should be displayed on the ...
0
votes
1answer
13 views

Add Body Class Based On Visibilty Of A Block?

Is there a way to add a css class to the body tag based on whether or not a particular block is visible on a page (node)? We have certain blocks that are visible on specific pages. It would be nice ...
1
vote
2answers
60 views

Showing block in specific urls and content types

I'm using this code to show block in specific urls and content types. <?php $match = TRUE; // block is visible on the content types entered here $types = array('product_display' => 1, ...
1
vote
1answer
31 views

Showing a block in specefic content type and urls

I have a block that i want to show it in a specefic content type and some urls . i tried to add php like : <?php $match = FALSE; // block is visible on the content types entered here ...
0
votes
1answer
36 views

Fix a constant width for first sidebar and second sidebar

I'm working on Zero point Theme in drupal 7. In my home page I've three blocks - first sidebar, content and second sidebar formatted as three columns. Here the width of first sidebar and second ...
0
votes
1answer
33 views

How can I find specific block name in structure->blocks in drupal-7?

I can see specific block in the home page. I need to show this block in specific roles. How I can find this block in the list of blocks in structure->blocks?
0
votes
2answers
36 views

Show Block only if it's a front page and GET variable is set

I am setting up a block in Drupal 7 to "show block on specific pages" through PHP. What I want is that if it's a Front page and there is a GET (listed) variable, only then it shows the block ...
0
votes
0answers
22 views

visibility field requiered when updating a node

I have trouble when I want to edit a node with another user in D7.24 , it can't be done and I have the error message visibility field requiered With the admin account (first created), it works! ...
0
votes
2answers
124 views

Show block for specific content type programmatically

How can I show a block on a specific content type programmatically? I want in my image the 'basic page' selected. I used the xxx_block_info() function, should it set in here?
0
votes
1answer
33 views

Customizing where to show block

Let's say I have nodes with the following paths: /chapters/university-of-florida/classrooms/class1 /chapters/university-of-chicago/classrooms/class2 /chapters/ucla/classrooms/cla I'd like to ...
0
votes
1answer
60 views

How to add page restrictions for blocks in frontpage?

I have several blocks in my homepage : 2 statics and 1 with a pager. I want to hide a static block when paging my homepage (after page "0"). I saw something similar in How can I show a block in a ...
1
vote
1answer
77 views

How to add Visibility Settings option for node/content type

I have created a custom content type for campaign in my module using: hook_node_info() and add fields using: hook_field_group_info(). This campaign content type will be showing to user site wide ...
0
votes
1answer
16 views

Allow block display on child nodes but not grandchildren

In a block configuration, I would like to show the block on /programs/* but not on programs/* /* I have seen a number of questions similar to mine. Block display using wildcard, non-greedy for ...
0
votes
1answer
54 views

custom block's BLOCK_VISIBILITY_LISTED not working on profile installation hook_install()?

Why this cannot work in my profile installation? array( 'module' => 'views', 'delta' => 'views-block', 'theme' => $default_theme, 'status' => 1, 'weight' => 0, 'region' ...
0
votes
2answers
89 views

Quicktab visibility by programing

I have a Quicktab with 2 tabs. The block is placed in user profile. Now I want to show one of the blocks only when the user visits his own profile and hide it when he is visiting other profiles. How ...
0
votes
0answers
26 views

Restrict block to specific page broken after last site update

I just updated my site to Drupal 7.26 release. As of the update the Visibility settings are ineffective. I have a simple block containing a paragraph that should only appear on the front page. The ...
0
votes
1answer
222 views

How to hide language switcher block if node has no translation?

Having a bilingual site here. Some nodes are translated and language switcher works fine. But the switcher block also shows up on nodes which aren't translated. Then the untranslated language link has ...
0
votes
0answers
23 views

<p> Tag and Image Problem in a Block

I've been using Drupal on my site for a year or so but after upgrading to Drupal 7, it starts showing some errors. I just can't get rid of < p > tag from a block which is featured on the homepage. ...
0
votes
2answers
95 views

How to control from a module the block visibility of a block implemented by another module?

The default options in the administrative page for block visibility (e.g. admin/build/block/configure/block/3) are not enough for my needs. For security reasons, I do not wish to use the PHP option ...
0
votes
2answers
55 views

Block display using wildcard, non-greedy

I have a block that I have configured to display "Only on the listed pages" commerce_store/store/* The problem is, it displays not only on the view link, which I want it to, but on the edit and ...
2
votes
1answer
197 views

Show block only in user own page and for administrator role users

What I'm trying to achieve: User can see block only on his own "user/[uid]/my-page" - he cant see that block on other users my-page. Users who belong to administrator role can see user block on user ...
1
vote
1answer
479 views

Can't set PHP block visibility programatically

Heres my code: $blocks['membership_package_information'] = array( 'info' => "Membership Package Information", 'visibility' => BLOCK_VISIBILITY_PHP, 'pages' => ...
4
votes
3answers
75 views

How can users block other users

In regards 7.x. Say a user that has a role of (registered user) wants to block another user with the same role that is harassing them and they don't want to see any more posts or comments from the ...
2
votes
4answers
848 views

How to hide an exposed filter block if the view results are empty?

I have an exposed filter block on the sidebar on my page. I want to hide the exposed filter block if the result of the view is empty. What is the best was to do it ? Right now i am having some Jquery ...
1
vote
1answer
60 views

Make block visible to specific IP (in D6)

On a D6 site I want a block that it visible only to visitors from a specific IP. If I choose Page specific visiblity settings with the PHP code <?php if(strcmp(ip_address(),'1.2.3.4')==0) { ...
0
votes
1answer
258 views

Displaying block only when user visits his own profile page

I want to display the block only when the current user visits own page. So in block visibility I use the following PHP: global $user; if ($user->uid == arg(1)) {; return TRUE; } else {; return ...
0
votes
0answers
58 views

Display message in block on cart page if specific product is in cart?

I have a Drupal 6 / Ubercart 2 website and I need to display a block on the cart page if a specific product is in the cart. It can also display if other products are in the cart along with the ...
0
votes
2answers
598 views

how to have block show up on specific pages AND specific content types

I want to be able to have a particular menu block show up on specific pages, as well as on specific content type pages. My content type pages don't start with /node, so I can't simply say pagename ...
1
vote
1answer
175 views

How do you use BLOCK_VISIBILITY_PHP, in hook_block_info, to hide a block?

I am user #1; I do have the PHP filter module enabled, but still my block is displaying, when I'd like it to be hidden. Here's my implementation of hook_block_info: /** * Implements ...
0
votes
2answers
192 views

Visibility rules if field is filled in

We made a visibility rule to display a field when a second field has been filled, and display another field when the second field is empty. It works well, but since we updated Ctools and some Drupal ...
0
votes
1answer
123 views

Drupal Block not showing up in right region

sidebar_first I am trying to have my custom block show up in region "sidebar_first" (region exists in the current theme). The block is showing up at the Block admin page but does not automatically go ...
0
votes
2answers
212 views

Display block based on main content type with view

I have created a view in a block, to display some related information to the current content type being displayed into the block. More precisely, I want to display the block only for book pages. What ...
0
votes
3answers
630 views

How to add page restrictions for blocks in drupal?

I'm using the drupal administrator menu for the settings there i have a page called /desert/234234 the block should appear only when the url is /desert/(desert_id) how can i restrict that
0
votes
1answer
129 views

How to display specific blocks for specific roles alone w.r.t domains and subdomains

I want to display specific blocks for specific roles alone with respect to domains and sub-domains. I know i can give permission for roles in the block to be displayed.How do i differentiate anonymous ...
0
votes
0answers
142 views

Setting visibility of menu / block

I am trying to set the visibility OF A a menu block, so that only certain roles can see it. This seems like a simple task, but I am having trouble getting it to work. I have using Drupal 7 btw. To ...
0
votes
1answer
85 views

How to show language switcher only on home page

In my multilanguage site i am using Language switcher (User interface text) and I have it located in block called "Help". This block is shown in the middle of the site, where I want it. But I want it ...
0
votes
1answer
100 views

How does a user subscribe to a group with GCC?

I have the Groups, Communities and Co (GCC) module installed [7.x-1.0-beta2] but I cannot find a way for an authenticated user to subscribe themselves to a group. I have moved the 'GCC Subscription ...
0
votes
1answer
25 views

Identifying drupal installation on windows

I don't want a google custom search to be shown on my development system which is on windows but it should be visible when on production system which is on Linux. How do I check it? This isn't ...
2
votes
2answers
526 views

switch views or hide block based on content type

I have a block view that gets its contents based on a contextual filter. I only want to use this filter if it's a certain node type being displayed ie. the block would use the contextual filter on ...
0
votes
2answers
64 views

Display a block when a view doesn't return any result

On node/48, the page is composed from a text and a view. I would like to display a block when the view does not return any result. How can I achieve this?
0
votes
1answer
131 views

block visibility based on user

I would like to remove certain blocks, so that admin can not see them. In block visibility settings - in pages tab, I try to put followng php code but with no effect. (In user tab there is no php ...
2
votes
1answer
148 views

Context reaction : Exclude specific block?

I've got a website with 3 large contexts : - internet - intranet - shop These 3 contexts are "tight" (sorry about my english, I think this is the word). My Block UI (admin/build/block) provides to ...
3
votes
3answers
571 views

show block on pages with a question mark ( 'searchquery' )?

For example end up with url's like example.com/viewname?f=[0]field_name=%3A21 I want to make a block visible on pages like the above but not when only the view is displayed. Only he view will ...
0
votes
1answer
21 views

What might be stopping this Contextualised Filter work in Block (please)?

I am stuck making a contextualised filter in Block View (and I guess if I knew my question, I would also know my answer). The view comprises A set of images which I can see in the View before I set ...
0
votes
1answer
92 views

How to Display a Block on a Page with a Variable URL

I want to show a block only on these user pages: .../user/USER_ID/recurring-fees. What will be the code to be placed in the PHP box to make this work?
0
votes
1answer
131 views

Tokens to change a block's visibility

I am trying to make a block visible only to pages whose URL matches user/[current-user:uid]/downloads, but I don't get anywhere. Do you have any idea on how to achieve this?
5
votes
1answer
90 views

Show block for /member/* but not member/*/likes

I want to show a block on a member's profile page (member/) but not on member//likes. It doesn't seem I can do this without php in the block setting, does it?
0
votes
1answer
26 views

What is the slug of mainpage?

I am editing blocks in /admin/structure/block - when I click "Configure" for a block, I see: Show block on specific pages All pages except those listed Only the listed pages Pages on which this PHP ...
0
votes
2answers
1k views

Display block on certain page

I want to display a block on the user/* page. I checked "only the listed pages" and entered "user/" but the block also appears on "user//relationships" for example. How can I keep the block on just ...