Blocks are self-contained collections of content and functionality that are displayed within theme regions.

learn more… | top users | synonyms

1
vote
2answers
47 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, ...
0
votes
1answer
9 views

Views Slideshow Stops Working Alongside Other Slideshows

I've made several thumbnail-sized cycle slideshows as block views, which display fields from nodes created via an HTML feed. Each slideshow is basically the same, but they all use a different taxonomy ...
1
vote
1answer
26 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
24 views

Creating New Region In Impulse Theme

Hey guys I am just looking for help with my page tpl file.... I understand after researching that I need to add code to a specific region in the file I am unsure of what to exactly implement (code) ...
-1
votes
0answers
7 views

Dynamic Display Block sometimes not displaying images in correct sizes [on hold]

hoping to get a bit of debugging assistance. My website uses a Dynamic Display Block for a slideshow of 3 images to cycle on the top header of each page. I managed to get the module set up and ...
0
votes
1answer
23 views

Drupal 7 Members Directory Problem

I created a member directory using view and it works well but I tried enable "Exposed form". I changed "Exposed form in block" to Yes & also "Use AJAX" to Yes. I defined "Contextual filters" to " ...
0
votes
0answers
6 views

Problem with sidebar-second displaying facets

So, I'm just using the bartik theme at the moment, and I have a view based on a search index displayed in a grid. The problem I have is that the second-sidebar that contains my search facets is ...
0
votes
1answer
18 views

How to make blocks contextually aware of current webform page

I have a multipage Webform that lives at a single URL and I would like to place certain blocks depending on which page the Webform is on. None of the webform hooks give access to page number, and the ...
0
votes
1answer
28 views

Where is $page['sidebar_second'] rendered? I want to edit the style of the <ul> listing of the recent comments

The comments in the block recent comments is styled with an unordered list. I want the points of the list beginn exactly under the N of New Comments. Google Chrome tells me that there is a ...
0
votes
3answers
28 views

Displaying a Block on 2nd level pages but not 3rd level

I have a block that I would like to only display on documents/* but not on /documents//. I have set 'Show block on specific pages - only the listed pages' 'documents/*' but this displays the block on ...
0
votes
0answers
24 views

Removing Anonymous DIV from search-block-form

I have created a sub theme under Bootstrap and am having issues removing the "anonymous" div from inside the form. Here is the displayed code: <section id="block-search-form" class="block ...
0
votes
1answer
13 views

Zen 5: How to get navigation menu on top with narrow viewport?

I'm running Drupal 7.28 with Zen 7.x-5.5. In the default setup, there is a region on the right side named "First sidebar" which contains a block named "Navigation". I have put my navigation links ...
1
vote
0answers
10 views

How to print price integer in drupal commerce cart block?

How to print price without decimals in drupal commerce cart block? I found this code: <?php global $user; $order = commerce_cart_order_load($user->uid); $wrapper = ...
0
votes
3answers
30 views

How to hide a block based on content type? [duplicate]

I have a custom content type where when loaded, I want to HIDE (no show) a regions block. Been looking around trying to find the answer and have come up short. Ideally, I'd want to do it in a ...
0
votes
2answers
22 views

Get Post data of a view in inside a block

I am actualy tring to get the posted data from a views filter and display it inside a custom block. This is what my code looks like for now <?php /** * Implements hook_block_info(). */ function ...
0
votes
0answers
9 views

Using content field widget in custom block?

I'm trying to figure out an easy way to implement a content field type (image_field) with a widget (imagefield_crop) on a custom block. The block currently has an upload image feature, but I want to ...
0
votes
1answer
34 views

Form and Textcontent in Block

I'm having problems with adding a form and text-content into a block. To get both, form and text, into my block, I use render() on my form, but I read, this isn't the best way to do, but don't found ...
-1
votes
1answer
26 views

Module Block destroys head

I'm struggling with blocks and a custom module. What I've got so far is a module which generates a block with that code: function commerce_bulk_invoice_block_info() { $blocks = array(); ...
0
votes
0answers
3 views

How to Add Location Search Block

I have Location and Location Search Modules enabled. Under Search Settings (/admin/config/search/settings), I have selected "Location Search" under Advanced Search Modules. This allows a user to ...
0
votes
3answers
31 views

Render custom block by block name

I have created a custom block in the Drupal CMS. Say it is called "test_block". Is there a way to render this block in a template file using the name of the block? Thanks,
0
votes
1answer
16 views

Export my block configuration

I have used configuration management to export and import my drupal configurations.However,when i add a new block,the configuration management can't track the change of block and i can't export the ...
0
votes
3answers
49 views

Debugging what has been submitted in a form

I would like to like to be able to print out what has been submitted in my form in the submission form. How can I achieve this?
0
votes
1answer
35 views

Custom block won't display in admin - Drupal 7

I am running into an issue where my block won't show up in the admin section of my site. I've added it to example_block_info() where the other existing blocks are declared. I've also added content in ...
0
votes
0answers
15 views

Show Block through node.tpl.php with filtering of “Only the listed pages”

For some reason, I have to show blocks within my node.tpl.php. I am showing the individual block like this:- $block = module_invoke('block', 'block_view', '18'); print render($block['content']); ...
0
votes
1answer
22 views

Override locale_block_view in custom module

In the locale.module file there is: function locale_block_view($type) { if (drupal_multilingual()) { $path = drupal_is_front_page() ? '<front>' : $_GET['q']; $links = ...
0
votes
0answers
21 views

Full HTML Block displaying incorrectly to Anonymous

I have been looking for help on this issue for awhile, but I can't seem to crack it. For some reason, I need to have "Bypass content access control" enabled to get this to look correctly. I may be ...
0
votes
1answer
18 views

Single Bulk Operation on several blocks

I would like to display on a single page several blocks generated by views and associate the same bulk operation to all of them so that the user only needs to click execute once. Where would you ...
0
votes
0answers
10 views

Is there a module for block translation for anonymous user

Hi I am wondering if there is a way to search the content of a block and see if there are user defined translations for any of the words in the block and if there are then give a option to translate ...
0
votes
1answer
15 views

If logged in, My Account/Log Out are missing, how can i fix?

I have a Drupal Commerce website in development and there is a problem with the User Login block. If logged in, it is missing the 'My Account / Log Out' links. But if logged out, is shows the ...
0
votes
1answer
30 views

View in views header still displaying when no result

I tried this question: Empty view is rendered even though there is no result And it didn't work I have a view of Judge nodes that displays using a contextual filter. Inside that view I have embedded ...
-1
votes
0answers
12 views

Separate configuration for each block instance?

I am trying to develop a custom block, where every instance of block can ask for the content from user and each instance of block can display its own content. (Take it as in terms of wordpress simple ...
0
votes
0answers
30 views

How do you edit the contextual links on a custom block in drupal 8?

Currently the only link that shows on the contextual links for custom blocks is the "configure block" link. I want to add an edit link to get to the main content of the block, is this possible?
0
votes
1answer
19 views

I try to customize my block id and it doesn't work

I create a block which I want to theme. My block ID is 1. In my mind it was simple as create a file block--block--1.tpl.php and make some theming on it, but I didn't see any of my change. One ...
0
votes
1answer
21 views

Image as form submit

I am building a custom form inside a block that has a clickable image as submit. Here the screenshot of the outcome: Here is the form code: function my_form($form, &$form_state) { $image = ...
0
votes
1answer
37 views

how to put html in a .module php file [closed]

I have a input box created with html need to put in the specific block. I saw posts writing there to add the html by function but i cant do it since it is php file Is it right way to do this? what is ...
0
votes
0answers
22 views

Form inside a block that “feels right”, theme-agnostic

I am building an autoresponder-like form that fits a block. So far i've added title, a body, two input (name and email) and submit button. While the body feels right and uses the space in the right ...
0
votes
2answers
61 views

Create block programmatically based on node content

In Views we can create a block that the content depends on the content of a node using contextual filters. So we can pass variables and check the visibility of the Views-Block. Let’s say in our ...
0
votes
1answer
26 views

Make a block from a “part” of a drop down menu

I have a D7 site with a drop down menu at the top, the second item across the top is "About Us". Presently it looks like this, see attached pic. I want the "contents" of this part of the menu to ...
1
vote
2answers
35 views

How to create a Bean type programmatically?

I'm building a module that creates set of blocks using Bean module. How do I can create a Bean Type programmatically in order to be able to create the blocks?
0
votes
1answer
13 views

Enabling a block to inherit the settings of a sub theme

Being relatively new to Drupal, I apologize in advance if what I'm saying is unclear, but I'd imagine that a fix should be simple enough: Basically, I'd like to add a header block that functions ...
0
votes
0answers
11 views

AJAX on multiple views pagers fails to work

I have a situation that not all of my AJAX enabled pagers are working. I have several blocks on a page where each block is a view with a pager. Each pager has a unique ID. I use Context to determine ...
1
vote
2answers
40 views

How to use a view block in a dropdown menu item?

I'd like to create a menu item that generates a dropdown menu with unread messages. I've already used Nice Menus for flyout menus, but I don't think that module supports what I'm looking for: the ...
0
votes
0answers
8 views

Metatags analysis and blocks

I am trying to get my site to use drupal module metatag to display description, abstract and keywords on the front page, if i type something into the metatag module say test it displays the result on ...
0
votes
2answers
32 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
20 views

How to add functions inside block PHP code

I have a node block which contains PHP code snippet. I found that if I define a function in that block and call it within the block, the code seems to break. I know that I can add the function into a ...
0
votes
0answers
16 views

Views exclude result if node doesn't have reference but only when view as anonymous

I am facing some weird situation with Views results. I have 2 content types: Vehicles and Pricing. Pricing is node referenced to the vehicle. So I first create some vehicle, and then a price, which ...
0
votes
1answer
29 views

when the hook_block_info is get called?

when hook_block_info() hook_block_configure() hook_block_save() hook_block_view() are get called? is it possible to call these hooks manually in a module?
0
votes
1answer
42 views

How to build a block on form submission?

I know how to build a block using these functions : hook_block_info() hook_block_configure() hook_block_save() hook_block_view() But on a form submission a few information is saved into DB and ...
0
votes
0answers
17 views

Drupal empty script tag

I am running into a problem similar to Syntax error: <!DOCTYPE html> (line 1) in Firebug I have a custom module that is creating blocks on specific urls. The error is showing up on other ...
0
votes
0answers
11 views

Sidebars and header no longer expressed but blocks are still defined

I inherited a Drupal 6.28 site using theme Colourise 6.x-2.1. I do PHP dev but am not very familiar with Drupal. Today without having modified any files and without having made other updates none of ...