Questions tagged [blocks]

In Drupal, a self-contained collection of content and functionality that is displayed in theme regions is called block.

735 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
99 views

How to include a PHP web file into the content region. from a module

I am new to Drupal and PHP. I am trying to create a module that when activated creates a page, then creates a block, configures block to only show on the created page, and then display an included PHP ...
1
vote
1answer
1k views

Grouping field in tabs - views

Under views when i select unformated settings and can Grouping field, it is working fine. Now i am using bootsrap tabs but it is not working How we can do this
1
vote
1answer
608 views

block view is not displaying

This problem starts with the subtheme. I am using drupal 7 with a subtheme based on omega 3.1. For some reason node title and admin tabs are displaying only on the home page and two basic pages, ...
1
vote
0answers
236 views

Buiding TABS with Quicktabs, Views and Entity References

I'm trying to build a tabbed content for node using Entity Reference , Quicktabs and Views in this way: 1- Create 2 content type: simple-page and tab 2- In simple-page content type I added a ...
1
vote
0answers
287 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. ...
1
vote
0answers
1k 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 theme_preprocess_block(&$...
1
vote
1answer
265 views

Programmatically building a Quicktabs instance

What I need to do is merge the usermenu ( user tasks ) with a Quicktabs menu I have on the same page. So what I'm trying to do at the minute is to programmatically build a Quicktabs instance. Based ...
1
vote
3answers
1k 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
2k views

How do I 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
192 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 = entity_metadata_wrapper('...
1
vote
0answers
109 views

Display -1st level of active menu item

I am using the menu block module with panels to add a sidebar menu to each page. It works great, except that where the options for "Starting level will be" are "active menu item" and "children of ...
1
vote
0answers
80 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 ...
1
vote
1answer
36 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 ...
1
vote
0answers
372 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
0answers
262 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 ...
1
vote
0answers
148 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 ...
1
vote
0answers
300 views

How can Draggable Views be used in columns?

I have a content type in which I would like to be able to have a 3 column layout and the user is able to drag different content (nodes/blocks) from one column to another, inline. I have almost ...
1
vote
1answer
88 views

Listing Latest Blog Post in a Block

This is my first time using Drupal so I'm not entirely sure if I'm asking the right questions. I come from a WordPress background so I may be approaching this problem in the wrong manner. I'm ...
1
vote
0answers
512 views

How to override or change a view block/region based on my frontpage template?

I have 2 different frontpages templates based on user´s device so I have: - mytheme/page--front.tpl.php - mytheme/page--frontmob.tpl.php and I have 2 different view blocks (even they are located in ...
1
vote
1answer
178 views

Custom Drupal (Block)Module not showing in Blocks

Relatively new to Drupal. I have created a custom Module that is supposed to create a block. I refferenced a successful module that accomplished the same end goal (implementing a custom HTML build). ...
1
vote
1answer
51 views

How to invite multiple users when editing user account?

I've installed the Invite module. I see that there is an extra block that you can active. When you do this you will see a block like this on your page: But I would like to have this field on my user/...
1
vote
1answer
113 views

Photo Gallery attached to Story - How to Create

I figured out a way to add a photo gallery to the bottom of a story using a custom content type for the photos, then creating a view with clickable thumbnails and saving it as a block. The problem is ...
1
vote
0answers
107 views

site's footer disappear when not logged in. only show up when logged in as Administrator?

Need help or guidance on this. I don't understand why website's footer disappear when not logged in as administrator. I am using OpenPublic openomega and delta themes. The footer is generated from ...
1
vote
0answers
26 views

Url called from flash asks from a logged user to login again

I have a flash animation in a block which has a link to a different page in my site. The problem is that even if the user is logged in my website, the link when it opens, asks for credentials again. ...
1
vote
1answer
66 views

Form - Show partial form in block then populate full form with partial data

I have a content type with various fields. Now i would like to show a couple of it's fields in a block globally and on submission post that data to the full form page and pre-populate the already ...
1
vote
2answers
50 views

Creating node with multiple custom blocks, best method

What is the best method to create a node that includes multiple custom blocks with content related to only this node? The main concern is having a method that content editors will be able to ...
1
vote
2answers
268 views

How to redirect views of entity types (bean) for user roles?

RabbitHole does not provide this functionality for bean blocks and Entity Bundle Redirect does not seem to work. There is a user role which may edit bean blocks but I want to prevent them from viewing ...
1
vote
0answers
144 views

Data Attribute added to block from Content Type field

So this is a very complex series of questions. I am brand new to module development (and PHP for that matter). I have a content type called "Parallax Block" with 4 fields: a title, an image, a ...
1
vote
1answer
94 views

Create a Block to display Titles - even pages, view-pages, articles

In my theme I need to hide the title of content, even the content-type pages and the Views page, and put it in a separate block placed in an other region than the content one. I figured out how to ...
1
vote
0answers
690 views

Drupal Bootstrap theme

I have a sidebar block and a content block. I want display both of them as inline. But my Bootstrap theme gives me one section (row) with col-sm-12, how can I create a new row, with a sidebar (col-sm-...
1
vote
0answers
656 views

Display video in an existing block

Thank you in advance for reading my question. Seems like many people have asked a similar question to what I'm about to ask, but mine has a subtle difference that I can't resolve. I need to the ...
1
vote
0answers
144 views

How to place add to cart,quantity and attributes next to each other

The default position of the add to cart, quantity and attributes list is in a block. Is there any way to have them next to each other horizontally. I am using Drupal 7.
1
vote
0answers
158 views

Updates to blocks not visible to anonymous users

I've recently put an update to the blocks on my site - they show for me when I'm logged in, but not for anonymous users. The previous arrangement of blocks remains visible, but without the additional ...
1
vote
0answers
47 views

Blocks administration page is slow

Devel query log shows too many highlighted same queries, like UPDATE block SET module=:db_update_placeholder_0, delta=:db_update_placeholder_1, theme=:db_update_placeholder_2, status=:...
1
vote
1answer
136 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) { ...
1
vote
0answers
266 views

Enabling a custom module generates errors for undefined regions when blocks are enabled.

A custom module defines some blocks, with this sample definition: return array( 'info' => 'Site Header', 'cache' => DRUPAL_NO_CACHE, // @TODO change it later 'status' ...
1
vote
0answers
49 views

Customized clean Views page output

Is it possible to get Views to return only block data markup and nothing else? I am trying to get the block data via AJAX and place it exactly where I want it. I just wonder if I can filter way all ...
1
vote
0answers
101 views

My images are not displayed in block

My images are not displayed in block and attachment page,but displayed in the content i check the views but don`t fixed i do anything with views and check permissions but not fix my problem. Of course ...
1
vote
0answers
1k views

change block region using template_preprocess_block() not working?

I'm trying to move a block from the content region to the sidebar region if the page is not the front page. I would think this would be fairly simple. I have the following code: <?php function ...
1
vote
0answers
14 views

Input Filter for only Blocks

i want to set input filter for blocks to only allow plain text, but on nodes I want to only allow full html how do i do this?
1
vote
0answers
303 views

Print whole expanded Main Menu in page.tpl.php / menu block

I am looking for a way to use drupal_render() to show the entire expanded main menu. Right now I am using this piece of code, but since I use the Menu blocks module from the third level on, all links ...
1
vote
0answers
349 views

Get rid of default block style for drupal menu block module

After lots of trying, i finally managed to find out how to make my menus active in drupal 7, using the drupal menu block module. There is one nasty thing which i can't find just a simple solution for,...
1
vote
1answer
236 views

How to allow a block on a page to load another block on same page in Drupal 7?

This is what I am looking for: On a page that has a block, I want the ability of a link within that block to load another block on the same page. (Specific case: a static page has a Views block ...
1
vote
0answers
274 views

Relationship action on custom user profile in custom block

I have customized the user profile view using panels. All great. Works like a charm. However i am stuck at one point. In the default view there is an option for users to add relationships (using the ...
1
vote
0answers
84 views

display 2 instances of same block - performance

I need to use the same block on one page on different locations at once. What would be the best option to achieve it, so it would be best for performance? I use context module and I can duplicate ...
1
vote
2answers
818 views

How to get a complete list of blocks that are active content on current page?

I'm trying to get a full list of blocks that are active content on the current page. Preferably it would include details of what type of content is displayed in the block. I need this information to ...
1
vote
0answers
190 views

what allows multiple selections in facets on commerce kickstart?

can someone tell me where the setting is to keep all the choices displayed after a selection is made in a facet block if my search is for a color say []Red []Green []Blue []Orange []Purple I'd like ...
1
vote
1answer
626 views

Block Settings not applying to Zen sub theme

I've created a Zen sub theme using the Starter Kit enabled it, and set it as the default (I've changed very little from the Starter Kit). If I go to Structure > Blocks there is only a tab for the Zen ...
1
vote
1answer
393 views

How do I add a more/less link in block?

How do I add a more/less link to drop-down and roll up a block? I have a custom search block with a lot of field items and as such, the block is so long. I want to be able to add a more link to drop ...
1
vote
1answer
942 views

Block is not showing up in a custom taxonomy page template

I am using Drupal 7 I have a content type courses. I have a page folder in template folder, with courses.tpl.php file. When i go to courses page it is showing contents from courses.tpl.php. Issues is ...

1
3 4
5
6 7
15