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

learn more… | top users | synonyms

0
votes
0answers
17 views

Getting html tags in translated block display

I created a block and enabled its translation settings. I followed this link to add ckeditor at block translation. When I view the translated block its shows block contents with html tags. Eg: If ...
0
votes
1answer
14 views

“Disabled” regions re-enable after navigating away and back from module page

I have a form module that I would like to have on its own page, with no header, footer, etc.. I thought I was successful with adding hook_menu() and a page callback to render the form's block, then ...
0
votes
0answers
5 views

Insert code in views-view-unformatted.html.twig for specific rows in views

Twig template - views-view-unformatted.html.twig: #} {% if title %} <h3>{{ title }}</h3> {% endif %} {% for row in rows %} {% set row_classes = [ default_row_class ? 'views-row', ] %} ...
0
votes
0answers
17 views

Drop-down containing blocks

I am working on building a new site in Drupal 7 and would like to have accessibility options. I'm using the Page Style and Text Size modules, which provide blocks that contain the accessibility ...
0
votes
0answers
6 views

How to create a custom markup for a views-block in Drupal 8

I'm trying to understand the templating system of Drupal 8, allready did some basic stuff. My next step is trying to create a template to mark up a list generated by a view. Here's what I've done so ...
1
vote
2answers
19 views

How to show a block on user profile edit page ?

I am trying to display a block on an user edit page (example: user/123/edit/custom_url, but for some reason, I can't seem to get it working. Any help is appreciated. I tried this, but this isn't ...
0
votes
1answer
27 views

How to change color and sidebar menu without using themes

We have a number of different themes on our website as we have different departments with different color styles. However, the only thing that changes are the colors of the sidebar and which menu is ...
-1
votes
1answer
24 views

Two random blocks displaying different fields from the same node

I have a content type with field_1 and field_2. I want to have two blocks displaying different fields from a one random node. I can easily create two random blocks via views module, but they wil not ...
0
votes
1answer
26 views

Firefox/IE not displaying CSS with Drupal website

In Firefox and IE (and maybe others?) it seems that the blocks that are built by drupal aren't having CSS applied to them. Any help at all would be wonderful, as the issue I'm having is not knowing ...
0
votes
1answer
19 views

Banner block (referenced by url) not displayed when using language extensions

I have a Banner View block that appears on pages using a reference url field. When the url: thispage is entered in the reference field of the banner, it appears on domain.com/thispage. Now that i ...
0
votes
0answers
15 views

add custom db query in a default block [on hold]

I previously built a custom module which can list data from database.Now I added a new theme on my site.The theme has a default list block.I want to show the same data from database in the new theme's ...
0
votes
2answers
34 views

how to add background images to blocks?

How to upload background images to blocks individually ? Is there any contributed modules available uploading background images to blocks?
0
votes
1answer
18 views

how to align blocks in a particular page? [closed]

As you can see, I need to align the two down blocks and relocate them to left of the page. Any idea? https://tavaana.org/fa/exercise26
0
votes
2answers
29 views

call external form in ajax callback

I have two forms (A & B) in custom module. Form A containing three fields(each field is dependent drop down) and Form B containing only one field (markup field to show data). The problem is that ...
0
votes
1answer
46 views

Adding custom block problems

I've created my own module in drupal 8. I also created block in my module. I tryied to add my custom block (which is type of custom form) to view. But when I am trying to add custom block in view, its ...
0
votes
1answer
21 views

Render a custom menu in a custom block

I want to create a block that contains somes links of a menu, without using the interface. So I created a custom module. Inside, there are somes files. a mymodule/test.links.menu.yml : ...
0
votes
1answer
13 views

Ajax form in block

From my experience, I believe Drupal8 treat Form API in BlockBase differently from FormBase Class, the below block doesn't seem to work. Do I have to do anything else to make Ajax Form work in Block? ...
0
votes
3answers
55 views

Display a block on front page only

How do I only show a block on the front page. I have on only listed pages under block settings and it won't disappear on the second page. I've also added $is_front drupal_is_front_page around the ...
0
votes
0answers
19 views

Call block in template file

Is there some simple code I can add to my page.tpl.php to call a block directly from the template file? I cannot add modules to this site Users need to be able to edit the contents of the block ...
0
votes
1answer
27 views

How to get Views Total number of records in Page.tpl.php file. (Before Views rendered)

See this image for more understanding. I want to fetch Views total number of records in page.tpl.php before views.tpl called. Is it possible to fetch that row total before views rendered? I am also ...
0
votes
1answer
21 views

Programmatically get menu block & alter classes

I'm invoking a menu block programmatically using: module_invoke('menu_block', 'block_view', 13); What I want to do is change and add classes to the wrapper & ul tags of the menu block, is ...
1
vote
0answers
27 views

Parameters in the HTTP request

I am trying to render a block depending on the parameter(entity) present in the requested page. Suppose if I am on a url like this: http://localhost/drupal8/user/1 then a block with label user is ...
2
votes
1answer
22 views

How to hide a block enitirely which has empty content (unless for a specific role)?

I have a custom block and I want to limit it only to one role. The position of this block is administrator->dashboard. I have set the visibility settings of block to be shown only to role editor, but ...
1
vote
1answer
21 views

How do i use Views to display articles in sticky footer

Not sure if i am going about this the right way but my intended goal is this: Create a sticky footer that displays: In Section 1(Left section) a Link to Latest magazine issue. In Section 2 (Right ...
0
votes
0answers
8 views

Cannot display output view block under or after exposed filters block

I created few exposed filters in block. However when I hit 'apply', I get its output view displayed on top of the exposed filters in a separate block. Is their any way or code through which I can ...
0
votes
1answer
35 views

All instances of block are not getting removed

This question is a continuation of this Block in Drupal 8, The second problem I am facing is that suppose I select block made for comment section and place it under Sidebar second section and ...
0
votes
1answer
12 views

How to find the count of items in a block?

I have a block named views-view-fields--our-services--block.tpl.php i need to find the no of nodes under this block.How do find the total no of nodes displaying inside a block?
0
votes
1answer
37 views

Block in Drupal 8

I have coded a plugin in my module which extends block base and generates labels for block in /admin/structure/block page under Place block. These block are being generated for different entities. The ...
0
votes
1answer
16 views

How to remove inner div from create block in drupal 7

Here, i struggling to remove inner div from create block in drupal 7.Here my working code with wrong result: <div class="ft_bottom"> <div class="container"> <div class="col-md-7"> ...
0
votes
1answer
37 views

How can I serve different view blocks based on media queries?

I have 4 view blocks that I want to show up as carousels on mobile. I'd like to be able to clone them, turn the clones into carousels with this module https://www.drupal.org/project/slick, then serve ...
0
votes
1answer
30 views

how to insert the See All link in a drupal view block

i created a News block that display only 3 lasted news, and i want create a button "See All News" how i can do it ?
1
vote
1answer
29 views

Redirecting doesn't work with a custom form in a block

I developed a custom form with FAPI and added a block for it. Block is included only on one specific page (basic node). When user submits this form it should redirect user to external site (URL is a ...
0
votes
1answer
36 views

Mini panel vs Block in Drupal 7

I am a newbie in Drupal. Can anybody explain how is block different from mini panel.
1
vote
3answers
59 views

How to prevent the login block to be shown twice?

When I open my web without being logged in, the login block appears twice. Once in sidebar and once in header (at least I hope it is header section), as shown in this screenshot: However, in ...
0
votes
2answers
33 views

View does not display results when added as a block to a region

UPDATE 2: I'm not sure if this is relevant but when click 'demonstrate block regions' the only region it displays is content UPDATE: I have just discovered that the block displays just fine when ...
1
vote
1answer
22 views

Drupal Block version controling before being published

Does Drupal supports blocks versioning, are there any modules can be used for controlling blocks revisions and publish selected version. For example: a newly created blocks shall be published after ...
0
votes
1answer
17 views

Vanishing Blocks/Menues

I have a legacy site running Drupal 6.19, and today, I found out that the entire side bar had disappeared. I haven't run any updates, and no administrators have been on the site for a while, so I'm ...
0
votes
1answer
15 views

A way/module to display a list of Blocks assigned to specific path?

OK, this is a bit tricky to explain, but I hope you understand what I'm looking for. I have a lot of nodes created with the 'Basic page' content type, and at least 20 different blocks assigned to ...
1
vote
0answers
21 views

Block vs Context positioning facet block filter

I have a Drupal Commerce site with faceted search (Search API + db index + views and facet blocks). My setup is as follow : - Catalogue view (based on my search index) - Facet filters block placed ...
1
vote
1answer
27 views

How to Split Regions

Is there any way I can split a region into 2 different regions. For example, in Garland theme I want to split the HIGHLIGHT block region horizontally into two regions.. is it possible ? Any help ...
0
votes
0answers
17 views

How do I create a view block with the rate module?

Below each node I have three rate widgets, "funny", "informative", and "boring". They're all individual "yes / no" widgets, with the second option removed. I want to display the top voted node of each ...
1
vote
0answers
37 views

Get Location module Block : how to show map markers for particular taxonomy term - exposed to user

I am using Get Location module for building store locator functionality in my site. I have made a content type with field = address and field type = Geolocations Fields with widget = Geocoder. I also ...
0
votes
1answer
13 views

Template file for Views exposed filter block

Views has a great feature where you can expose the exposed filters as a block (Exposed form in block under Exposed form). So what's the "standard" way to theme these? Is there a Views template for ...
1
vote
1answer
22 views

Save my link configuration with drush or else?

I just modified my database so I can translate 2 link from a block that I made. The translation won't show up until I go here admin/structure/menu/item/1022/edit and press Save. I would like to know ...
1
vote
1answer
36 views

Drupal 8: How do you migrate block content from a dev to a production site?

I've finally started looking at Drupal 8 seriously and I'm particularly interested in the configuration management. I've come across something that could be a little bit problematic and that's ...
1
vote
1answer
35 views

Change URL to meaningful name when I use hyperlink target

Scenario: <a href="#block-block-1">Book</a> When I click book, it will scroll down to the block and url will be www.example.com/#block-block-1. Is there anyway to change url to ...
0
votes
1answer
20 views

How can I create a view that displays the most popular nodes based on an outgoing link?

The link is a text field that's value is pulled directly in node.tpl: <a class="list-parent-link" href="<?php echo $node->field_download_link['und'][0]['value']; ?>"> I'd like to be ...
0
votes
0answers
11 views

When creating new theme all blocks from main theme are automatically inserted

I'm using the domain access module to use different themes on different domains. I created a new theme. However when enabling it, all of the blocks from the main theme were automatically inserted into ...
0
votes
1answer
12 views

How to organize a lot of related blocks for facet search programatically?

I am experimenting with Solr search and the Facet API, and I've created a search page that now has about a dozen facet blocks on it. Right now it just looks like Block 1, Block 2, Block 3, Block 4, ...
0
votes
1answer
16 views

$page not targetting views block but $is_front is. Need help with trying to solve this in any way

I wrote this poorly the first time, more succinctly: I need a custom node.tpl for the same content type in the front page teasers, the node itself, and a views listing of that node in the sidebar on ...