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

learn more… | top users | synonyms

-3
votes
0answers
27 views

How do I create a drop down for a specific block?

I have a block on my Drupal site that shows users images when they log in. I would like to add drop down functionality to offer additional options for that placement. Like my account, published ...
1
vote
1answer
16 views

Better way of adding Image as Block in home page

I am designing a personal website. I wanted to display my photo in the side bar in the home page. Below is screenshot- To get the above display, I have created a basic page in which I have inserted ...
-1
votes
1answer
20 views

Fatal Error - Fatal error: Unsupported operand types in public_html/includes/common.inc on line 2999

The page of my work is not loading anymore! And Im not used to deal with drupal! What I have to do to the page load properly! I even cant login as user or see any page of the site! PLZ im really ...
0
votes
0answers
14 views

Permanent login form in header

I'm trying to create a login form which remains permanent in the header and doesn't go away once the user signs in. This is what my header looks like in page.tpl.php <div id="page"> ...
0
votes
1answer
25 views

How to programatically add block to Drupal 7 page tpl AND respect visibility rules?

I want to add a block programatically to a page.tpl.php file in my Drupal 7 theme BUT I want it to respect the block's visibility rules. I'm open to defining new visibility rules in PHP too but it ...
0
votes
0answers
18 views

How to display blocks in custom front page?

I used custom front page name page--front.tpl.php. it's full of html code. Now i want to add blocks in this custom page, but i don't know how to add blocks in this page.
0
votes
0answers
11 views

file_validate_size doesn't seem to work

I'm currently learning how to make a custom module that creates a block with a textfield and upload field. So far so good, only thing is: Drupal doesn't seem to respect my file_validate_size value. ...
0
votes
1answer
15 views

Drupal 7 - Anyway to make Facebook Picture take place of User Picture if not available

I am creating a view of users that displays a list of Users with Picture and Name. This drupal install allows facebook users to sign in and automatically have an account created. Their account is also ...
0
votes
1answer
21 views

Add block to form (before submit button)

I'm having problems placing a block in my form. This is what I have now: I have a register form and a fb button block. I say the block must be visible only when page is equal to user register page. ...
1
vote
1answer
41 views

Contextual filter only working on one URL

I've been going through posts such as View block not accepting contextual filter argument, Contextual filter on Views Block file not found, How do I get a block to use a URL to configure a contextual ...
0
votes
2answers
17 views

How to make a custom block listen to context module?

I've been creating my own module that consist an array of blocks. I plan to print them using context as oppose programatically as I already have the module on use (no need to reinvent the wheel). ...
0
votes
1answer
15 views

Adding a block to markup

I have created several content types and using views I have created blocks that take the uid as an argument and displays content that that author has created. So far so good. What I want to do now is ...
-1
votes
2answers
16 views

How to create multiple blocks for blog teasers from a single view automatically

I have created a site whose home page is built in a way that it will display 4 latest blog posts in separate blocks all the time. I have created a view and successfully created a single block ...
0
votes
0answers
12 views

Large unknown margin-left for Views blocks

I have a lot of fighting against some unknown large margin-left , around 30px in all themes I start to work with (Zen, Adaptive Theme) - I think it's for Blocks generated by Views... I haven't found ...
0
votes
1answer
18 views

How do I disallow blocks from showing on all node edit pages?

So far I have tried "All pages except those listed" node/0/* node/edit node/%/* node/%/edit/*
0
votes
2answers
25 views

Custom module template override not loaded

Hi I am desperetly trying to override the template of my D7 custom module's block here is my code : function lnr_block_info() { $menus = menu_get_menus(); ...
0
votes
0answers
11 views

Menu link description translation with apostrophe changed in &#039;

I'm having trouble with showing the description of a menu link in different languages. I'm using the module Menu Block for Drupal 7 to have submenus. I'm using a sort of tag language called Drupal ...
0
votes
0answers
17 views

How to seperate view custom link/url from view content

I override block using these technic https://www.drupal.org/node/1089656. <div id="<?php print $block_html_id; ?>" class="footer-links-regions <?php print $classes; ?> ...
0
votes
1answer
16 views

Load .js only if block is loaded

Yes, something like that. If block and it's content are loaded in the page (so I guess detect by ID or something) it would load the .js, but if block is not loaded, it wouldn't load the .js. I need ...
0
votes
2answers
24 views

How to theme a blocktitle of a view?

As i am still developing some basic php skills: I want to theme the title of my views-block slightly (just color and fontweight) I have created a views-view--my-view--block-1.tpl.php and pasted the ...
0
votes
3answers
24 views

How to get rid of a duplicate title on the front page?

Here is the site in question: http://test.ctrpclub.org When I first made the front page, I created a Basic Page and selected "Promoted to Front Page" and thought I was done. Drupal insisted on ...
1
vote
2answers
22 views

Views No Results: Show Block Instead?

I have a view that is set up to report breaking news from a "breaking news" text field. But this field is often empty, and in the no results behaviour, we would like to show one of our special offer ...
0
votes
2answers
29 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
29 views

Exposed Filter Results Displaying in Nested DIVs (using view-dom-id-<?php print $dom_id; ?>)

I am trying to create a page that displays a bunch of resources with a filter to allow the end-user to sort the resources by type. I am using the following versions: Drupal 7.28 Views 7.x-3.8 ...
1
vote
1answer
24 views

Problem adding html to blocks

I seem to have a problem when adding html to a block (i'm using ckk editor), if i toggle Source it loses them html id tag. If I save the Block without toggling, it works fine, but when I go back in to ...
0
votes
2answers
18 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
39 views

Moving functions in block module to inc file

I have searched everywhere for an answer to this question, and have found little to no help on the subject. The closest question to my own would be this, but the answer for it is a bit different than ...
0
votes
0answers
17 views

How to pass a taxonomy term to blog view through a url in a view page

I have a view page named Testing . I have a Block view that uses a taxonomy term to get content . i want to pass the Taxonomy term through the Url to the block on the Testing page . eg: ...
0
votes
0answers
17 views

Block to Block Communication

I am creating a view that displays content in styles that vary as a user scrolls down the page similar to the windows tiled start menu. Using views I know that I can format an unformatted list to do ...
0
votes
1answer
29 views

Creating a view with a dynamic link from taxonomy term

Trying to create a view block with a list of five links Event Details (dynamic) Cause (dyanmic) Sponsors (statis) Volunteer (static) Register (static) Dynamic url will look like this: ...
0
votes
0answers
30 views

Load calendar event details in different block on same page

I'm using the calendar module to manage my event list and I would like to be able to click an event link in the calendar in the main part of the page and have the event info load in the same page's ...
0
votes
1answer
25 views

Change a heading?

A panel has an article title that is wrong and I'd like to make it right, but; I can't find where the wrong data is coming from. I'm having a little difficulty identifying the components of Drupal, ...
0
votes
1answer
38 views

Pages on which this PHP code returns TRUE

I have a problem with this function in drupal. I have a block and I only want to show it if a specific condition is met, the problem is it does not work as I imagined. This is what I want: <?php ...
0
votes
0answers
21 views

Add class to view block if view has count result using template.php

I need to add class to view block if view has certain count result. For example if count result is 4 or less. I have working code for view format HTML list, but I need to use Unformatted list. ...
0
votes
0answers
39 views

How to add class to view block programmatically

I need to add class to view block programmatically, but could not find working way to do it. My view format is Unformatted list. I have this in my template.php: function ...
0
votes
1answer
29 views

How to display 2 blocks in one view

I am using quick tabs, but I want to display 2 blocks under each tab, been told I should use attachments but I don't get. How can I achieve this? So each tab displays 2 blocks when clicked like in ...
0
votes
0answers
19 views

When I click on the demonstrate block regions, I get an access denied message

I logged-in as an admin. And when I click on the demonstrate block regions, I get an access denied message in Drupal-7. I have cleared all caches. But, still get the same problem. Any idea how to ...
0
votes
1answer
26 views

How to edit a webform block (not the webform itself)

I have one webform block I would like to edit. I know I can use hook_form_alter, the problem is that any changes I make using it are affecting the actual webform plus the block. How can change stuff ...
1
vote
1answer
28 views

In which file to add the cache_clear_all function

In my situation I would like a certain block on my page with real time information to not be cached for anonymous users. Literature listed below: https://www.drupal.org/node/42055 ...
0
votes
2answers
31 views

Taxonomy hierarchy in filter block of views isotope?

How can I set the filter block to show a hierarchical taxonomy? As far as I can see there is only a flat list being built by default. How can I change this and apply the hierarchy of a taxonomy? this ...
0
votes
1answer
24 views

Block configuration per region

Anyone ever accomplished building a module that manages to have block configuration per instance? The main issue with blocks is that each block does only one thing no matter where it shows up, you ...
0
votes
3answers
38 views

Drupal 7 template_preprocess_block

I am trying to alter content of the system main block but only on the front page. I have added template_preprocess_block() in the template.php file, but is_front is FALSE even though I am on the front ...
0
votes
2answers
38 views

dynamic block title for block-view of referencing nodes

I have a block listing nodes that all reference the same 'parent node' (etity reference). I would love to see the title of the referenced node as a title of that block. Example: on a record label ...
0
votes
2answers
81 views

Promoted to frontpage teasers in a block

General: I am new with Drupal; so, I was trying to add new regions to Zen (sub)template, but got very confused why contents of my new-created region "content 2" appears on page above the original so ...
0
votes
2answers
56 views

Alternative to panels

Is there any alternative to Panels that can be used for smaller websites where Panels may be a overkill? I recently took up DP development again, haven't worked with DP7 for approx a year now, did ...
0
votes
1answer
15 views

Views, Blocks, and Content Types

I made a content type where I have used views to make my content into a block. But the content type's page shows two copies of the data. One from the content type, and another from the block made ...
0
votes
1answer
33 views

Is there a way to add a wrapper class to my blocks?

While views does a great job of placing blocks and content on a page, I am trying to make my website responsive. It is true that the blocks are responsive. I am just trying to make it so that the ...
0
votes
2answers
30 views

Dymanimcally add links in main menu (e.g. last 4 nodes)

I have main navigation menu with root menu items. A request is that one of those have links to latest 4 nodes of a certain content type. So for example if I have a structure similar to this: -Parent ...
0
votes
0answers
22 views

ImageFlow view link to content problem in multi language site

Using views ImageFlow in multi language site. Suppose default language is Arabic and another language is English, when imageflow block in default language link to content is works fine. When turn ...
0
votes
3answers
50 views

Responsive Blocks

How can I make blocks shrink while staying on the same line as the window gets smaller? As of right now my blocks are going under other blocks as my window gets smaller. How can I make my theme ...