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

learn more… | top users | synonyms

0
votes
0answers
15 views

A view of existing blocks?

my aim is to make a grid of existing blocks. I've Tried to make a Content based View and filter it via Block ID's, but when I came to filter this View, I found no such option. I've tried to check the ...
0
votes
1answer
21 views

How to add a custom field to views block

I have a view (block) created. When I modify the view block, I have only the field "block title" in the form. However they are 3 fields (block title, block description et block body) in a block of ...
0
votes
1answer
7 views

Advertisement block changing

I have a Drupal 7 site, where there is a normal static block at the top of my content region. This is basically an advertisement with some full html content. Now I want to have a second similar block, ...
0
votes
1answer
25 views

How to insert a block inside the content?

I need to insert a block inside in a specific place of my Drupal posts of only one type. I understand that would be done through page.tpl.php file but can somebody explain how do I actually create ...
1
vote
1answer
19 views

Ajax form works on page but not on block

I've created an ajax form with drupal API. The ajax functionality works if I render the form on a page with hook_menu, but it doesn't when I render it in a block. This is how I create my block: ...
0
votes
1answer
15 views

Blocks stopped showing on views page

I was hoping you could help me with this problem on my website. I have a views page "News" for a long time now. (q?=news) I also have 2 blocks that I want to show on that page. On the configurations ...
0
votes
0answers
6 views

Block loaded via AJAX needs to use $_SERVER['HTTP_REFERER'] but cannot because that is the page itself

I'm caching my site and blocks but using the AJAXblocks module to load a dynamic module that I do NOT want cached after the cached page has already loaded. This works great, but now what I want is for ...
0
votes
2answers
30 views

Don't show blocks on some pages

I don't want to show blocks inside some pages, and I can't touch the theme files. Is there any way to do this programmatically inside a module?
0
votes
2answers
11 views

How can I display a message to visitors from a specific referer with caching enabled? [closed]

I want to show a certain message to visitors coming from a certain website. I setup a block that only shows up if the refering domain is what I'm looking for. However, with caching enabled this ...
1
vote
1answer
29 views

2015: What am I missing to get a simple hit counter block by page?

I've tried every recommendation I can find; I've enabled statistics and advanced statistics and can see that hits are being counted. I can display lists by what nodes are the most hit, etc; but I just ...
0
votes
1answer
22 views

Search API Views - How to display facets on a views block?

I am using Search Api Views and Facet API to achieve that. I am trying to enable facets to a views block, or when calling a view programmatically, but unfortunately they are not displayed as ...
0
votes
1answer
29 views

Custom node field type should also support content blocks in D8 - what to do?

I'm using https://www.drupal.org/project/paragraphs for nodes. "Paragraphs module comes with a new "paragraphs" field type that works like Entity Reference's. Simply add a new paragraphs field on any ...
0
votes
2answers
31 views

Question about views (related to page specific blocks)?

Lets say I have a website called "website123" along with several pages called "pageA", "pageB", "pageC" and "news". Each of these pages has custom blocks that will only display on these pages. (Think ...
1
vote
1answer
30 views

Block loading behaviour in Drupal 8 in a performance sense through the visibility settings

The following scenario: - i have for example a standard block region through a pages of a site: "highlights" - for the frontpage i have an additional region: "highlights_frontpage" - i put a block ...
0
votes
1answer
19 views

how to set a global variable that is referenced throughout the site?

i'm trying to avoid programming and hoping i could do this with modules: I have a classified ad's website which has about 100 categories where users can add an advert. The thing is these are all ...
1
vote
2answers
29 views

Is this block safe from code injection exploit?

Thanks good people here, I have create a simple module which generate two blocks as follows: function myblockmodule_block_info(){ $block['myadblocks'] = array( 'info' => t('My first ...
0
votes
2answers
14 views

How to define multiple blocks in a module?

Thanks to this tutorial, I cam up with this block-generating module: function myblockmodule_block_info(){ $block['myadblocks'] = array( 'info' => t('My first ad blcoks'), ...
0
votes
0answers
33 views

Drupal 7 module to create blocks?

I am wondering if there is any available module in 7 that creates some simple blocks? I need to be able to use script and iframe tags in the blocks but neither input formats nor modifying them ...
0
votes
1answer
43 views

How to avoid script being injected into costum blocks?

I have a custom block in which I put iframe and javascript ads. I noticed that recently they are being exploited so that attackers add some script to them (i.e on custom block table). I use Full html ...
0
votes
0answers
15 views

How to create a submenu based on taxonomy in node list made by a view?

I have a view showing a grid of content nodes. They all have taxonomy terms. I wish to make a block or expose a filter (or something else) that will have all the terms listed in the nodes who are in ...
0
votes
0answers
28 views

Contextual links for custom blocks: Add “Edit block content”

has somebody an idea, how to customize the contextual links in D8? I have created a custom block type and it would be wonderful to have a link in the contextual links menu: "Edit block content".
0
votes
1answer
10 views

Get config variable value in hook_block_list_alter

works I have added a new field to block configuration settings by using the function hook_form_FORM_ID_alter. I used submit handler to save the variable $form['#submit'][] = mymodule_submit (as ...
0
votes
2answers
22 views

Print a block inside a Views header or Views footer using PHP input

There seems to be multiple ways of printing a drupal 7 block via php input filter. What is the most efficient way of printing a drupal block in Views header or Views footer attachment of a global text ...
0
votes
2answers
14 views

height of block with view containing exposed filter

I have created a block with a view containing an exposed filter (drop downbox, auto submit). Based on the selection in the dropdown, the visitor will see a short or long list of results. This block is ...
0
votes
1answer
24 views

Drupal Block Render

I'm looking for a fix to my block that doesn't render on the comment page. Here is the code. $path = current_path(); drupal_set_message('path: '.$path); if (strpos($path, 'comment/reply') ...
1
vote
1answer
14 views

How to call CCK as block?

Actually I created user's request mail form as CCK.This CCK displayed page name as node/add/laptoprepair.I want to display this CCK page as Block for the purpose of calling multiple page.How to create ...
0
votes
0answers
35 views

How to add menus to my footer block (nested blocks)

I created a module in Drupal 8 called Footer and made it a block so I can include it in my Footer region in my theme. I need my footer to have two menus, one listing topics and one listing static ...
0
votes
0answers
15 views

Cannot get any tweets using Twitter Block

I have installed the twitter block module but I only occasionally get any tweets - if I do they disappear when the screen is refreshed. I have tried all browsers and it is the same everywhere!
1
vote
1answer
19 views

Customize the display of a block

I'm new to drupal, I'm using Finder module, I was able to hide some buttons and clean the presentation a little bit, but I want also to be able to customize the search fields display, I'm not sure if ...
0
votes
2answers
17 views

there is no edit option on certain views of drupal site

There are certain blocks/views in drupal site where edit option is not coming and i am unable to figure out how to change them.
0
votes
0answers
20 views

“Reset” all flag

I'm working on a site that uses the flags module. each user needs to be able to "reset", or "clear" all the flags they have set with a single button. The button is displayed from a content block that ...
2
votes
2answers
52 views

Difference between bootstrap carousels and how to set up

I have tried to add the bootstrap carousel to the bootstrap business template. I have researched every possible forumpost about this slider, but can't get it to work. Now, the slider works perfectly ...
0
votes
2answers
21 views

How do you hide a block for specific users using views?

I have a bunch of blocks that I would like to have hidden by default and only shown to specific users that will be determined by a view. Is this possible? Thanks!
0
votes
1answer
27 views

Block Visibility Settings not working

Now for a specific block, i wanted it to be visible only on the front page. So I edited the block visibility settings for specific pages and made it <front>. But the block is showing up in all ...
2
votes
2answers
22 views

placing a menu block inside a views template

I need to place a menu block (the main-menu) inside a views template file - the template for the rows design. I tried $block = module_invoke('system','main_menu'); print render($block['content']); ...
0
votes
1answer
22 views

Passing arguments to a block

I am working on trying to understand the secrets of custom-developed blocks. Namely, I have a use case where a block need to pull content via EntityFieldQuery (this could be done with Views, but I ...
0
votes
2answers
42 views

How can I implement this floating sidebar block?

I'm going to implement a floating sidebar block that can contain user's selections. It is a kind of cart. Please check the image below. If the use press 'Add to my favorite', then it should be ...
0
votes
3answers
31 views

Solutions for frontpage that consist of only blocks

What methods are there to construct a frontpage that consist of only blocks. I know i can setup panels + pagemanager and add blocks in that manner, but it seems a bit overkill to install panels just ...
0
votes
0answers
29 views

How to call JavaScript or JQuery scripts in Drupal 7 blocks

Since the Webcam module seems to have fallen into disrepair, I tried to create Blocks containing an <img> and a small <script to automatically reload it. An SO question gave me some hints how ...
0
votes
1answer
23 views

Exclude a block from the views result

I've created a views page named "Search" with a path of "product-page". Then I created a views block named "Sponsored Ads". With the "Search" page, I exposed some fields for the filtering, then ...
0
votes
1answer
26 views

Restrict blocks to specific pages

I am using someone else's theme on a very small site. Specifically, I want to display blocks on specific pages. I am able to display blocks on only and on all pages except . My understanding is ...
0
votes
0answers
22 views

Duplication of code when creating custom block template

I'm a newbie in Drupal but I'm working on a project with drupal 7 and I'm going out of my mind. I have a block which content must be wraped by different links if is seen on desktop or on mobile ...
0
votes
1answer
72 views

Theming / modifying the markup of default search block form

I'm trying to modify the basic search block form that comes with Drupal 7 core. I have a custom theme and inside my templates folder I copied the search-block-form.tpl.php and modified it like so ...
0
votes
1answer
28 views

add custom data attributes to block from block configuration page

Here is what I would like to accomplish: 1. Add data attributes to block (for example: data-key="value") 2. Nice to have: add a text area to block config page where i can enter data attribute ...
0
votes
1answer
39 views

How to put two blocks inline in menu bar

In every theme I tested so far, when a block is added to Menu bar area, each block is always shown stacked in pile, my question is: There is a way to to make two or more blocks showing inline in ...
0
votes
0answers
13 views

Webscrapper that only adds new content

I would like to make a webscraper that updates the results of a volleybal team and puts the most recent score in a block on the frontpage. Got the scrapper working with kimono. But this imports all ...
0
votes
1answer
28 views

Show Block view of Restricted Content Type

I have a content type of Events which i make restricted for anonymous users via content_access module. But on the home page there is a block view of most recent Events. I don't want that block view to ...
1
vote
1answer
55 views

Show block on all 404 / 403 pages only via context

Without having to install even more modules on the site for context. I know there a boat load of plugins for context, but I was wondering if this can be achieved by just using core context: I ...
2
votes
1answer
30 views

Blocks display in the wrong place and can't be turned off

I'm experiencing problems: Some of my blocks are appearing in two blocks at the same time. Some blocks appear when disabled, even if I disable the block is still appears in one of the locations. It's ...
0
votes
2answers
32 views

Display block on two different pages

I'd like to view my block on pages where the content type = booking and where the address is node/add/booking (basically add, edit and view nodes), how can I accomplish this? So far my code only shows ...