Questions tagged [drupal-blocks]

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

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

See also

162 questions
0
votes
3 answers

Custom block not displaying

I created a custom block for my Drupal 7 install like this: /* * Implements hook_block_info * To create a block to display the information for planB in the footer. */ function planb_block_info() { $blocks['planb_footer'] = array( 'info' =>…
KerrM
  • 5,139
  • 3
  • 35
  • 60
0
votes
1 answer

Error accessing blocks in Drupal 7

I have migrated my Drupal 7 website to a server, and now I can't access the blocks via the admin menu; all I get is a white screen. It was working perfectly in my localhost.
Eduardo Oliveira
  • 676
  • 8
  • 25
0
votes
1 answer

Drupal Site Index - not crawling through "Blocks"?

I created a "View"* in Drupal to grab all the content and essentially make a site map, but I realized that it doesn't have an option to grab content from the Blocks I have created. Does anyone have an idea if I can even do that? If not, should I…
0
votes
1 answer

Drupal 7 Ubercart, custom blocks displayed in external article based on product

I'm currently creating an ecommerce site using Drupal and the Ubercart module, for each product I need to have the option to display an article (blog/story) that relates to that specific product. I also need the article pages to display related…
tcnarss
  • 585
  • 5
  • 23
0
votes
0 answers

Not able to save block or view configuration or uninstall modules when a domain is selected

Drupal Version: 9.2.21 Domain module version: ^1.0@beta Expected Behavior After selection of added domains, The configuration saving and uninstalling any module should work as expected. Actual Behavior After selection of added domains, I am not able…
0
votes
1 answer

Drupal 7 change block subject in template.php

I have a block in my page and that block has a title. How can i remove this title (subject) within template.php? I tried hook_block_view_block_alter() but it doesn't seem to work? I could add a space character in the block configuration screen but…
dianikol
  • 213
  • 1
  • 4
  • 10
0
votes
1 answer

Changes to Drupal blocks no longer taking effect

I have a D6 site that I've just stumbled upon the fact that my block positions are no longer being updated. I have a given block (a Views block) that works on older pages but not newer ones. I've tried creating new blocks and they do not show up…
Collin White
  • 640
  • 1
  • 11
  • 27
0
votes
1 answer

Multiple instance drupal 9 blocks (Block types vs Block plugin)

I want to create a module that allows creation multiple instances of blocks which render different graphic effects. The module should allow creation of unlimited blocks each with their own configuration. Each block instance would have a dynamic…
0
votes
1 answer

How to render a custom block with variables from another custom block twig template

I have a custom block with some values I can access in twig template of that block. Let's say variable product_type and in same twig file I'm adding another view block like {{ drupal_block('views_block:my-view-block_1', {product_type: 'clothes'})…
0
votes
3 answers

Drupal PHP block visibility rules

In a Drupal block's Page Visibility Settings I'd like to prevent a certain block from showing if the second value in the path is a number. This does not seem to be working for me. Cheers. Show block ONLY when arguments are: domain.com/video/one (arg…
Allan Thomas
  • 3,481
  • 5
  • 26
  • 29
0
votes
1 answer

How do you configure views block based on node reference in Drupal 8/9?

There is a node pages that holds reference fields of the taxonomies (course type and semester). For example: Summer Literature Courses: course type of 'Literature' and a semester of 'Summer'. There is a node courses that holds reference fields of…
0
votes
2 answers

How arrange Blocks in Drupal 6?

I am a newbie in Drupal, I just created a module and try to display. But the block HTML code breaks all boundaries of the Theme. How we can control the HTML in blocks ? For example my block code is function…
Ashok KS
  • 365
  • 2
  • 14
0
votes
1 answer

Hide a Drupal block on mobile devices

I'm making a new Drupal site which is based on a non-bootstrap theme and makes heavy use of blocks to place content. Some blocks display content that is better to hide on smaller screens to have a nicer look and feel. I want to hide them, but I…
0
votes
3 answers

Drupal: Retrieve and print a node name (not type)

I’ve a block, created in the views module, where I post the most recent comments made by a user (e.g. the five most recent comments for user uid 1033). I’ve created my own tpl file so I can customize which fields I want to display and it works. It…
Emil Devantie Brockdorff
  • 4,724
  • 12
  • 59
  • 76
0
votes
1 answer

(How) can I define a block with arguments in Drupal?

I want to develop a module that defines a block which can be invoked with arguments — for example, a block is an ad zone template and the argument is which zone I would like to invoke. I want to use a block because I am using the Panels module for…
Pattie Reaves
  • 175
  • 1
  • 3
  • 11