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
1
vote
0 answers

Drupal 8 custom block output becoming blank after clearing cache

I have created custom block in drupal 8 using custom module. Assigned a twig template ( located in active theme ). I am passing some custom theme_settings to twig template using theme_get_setting() method. Everything works perfect. But once i clear…
harish
  • 578
  • 2
  • 8
  • 21
1
vote
3 answers

Using PHP variables inside body content area

I'm having trouble with using PHP code on my pages, within my body content area. I've searched tirelessly on this site, Drupal's site, and other sites in general, so I apologize if the answer is on this site somewhere, but I can't find it and I need…
Julie
  • 11
  • 1
  • 3
1
vote
1 answer

display /admin/builds/blocks in several page drupal

how to moderate for /admin/builds/blocks because i have 150 blocks and this loaded page is very slow , can i this page show in several page? or show any region blocks display in page?
reza
  • 133
  • 13
1
vote
3 answers

Variables value is not passing in twig in drupal 8

I am learning drupal 8 and making a custom block programmatically and also using twig with it. I am passing two variables to twig but the problem is that only value of first variable is shown on the page value of second variable is not showing. And…
Nida Akram
  • 332
  • 2
  • 9
  • 24
1
vote
2 answers

content block with more than 1 content items

The following code is a Drupal block made in php. 1) How can I implement more then one item? now i have test1 but i want test1, test2, test3 and test5. 2) how can i link a title for example test1 to my admin/settings/ menu? I want to link an item…
user001
  • 441
  • 3
  • 8
  • 24
1
vote
2 answers

How to restrict a Drupal block from being displayed if a user does not have a particular permission?

I know that I can use the Show block for specific roles setting to manually configure whether a block is displayed to users. I have a module that defines custom blocks. Rather than relying on the administrator to restrict the block visibility based…
Matt V.
  • 9,703
  • 10
  • 35
  • 56
1
vote
1 answer

Theming two Drupal aggregator blocks separately

I'm fairly new to Drupal but have played with it for a while now - but this one's stumping me: I've got two aggregator blocks on a site that I'm currently building. Is there a way of theming the whole block? Secondly, is there a way of theming the…
user527892
1
vote
2 answers

Drupal 8: How to get all blocks in a region to use the same template

So what I am trying to do, is to get all the blocks in footer region to use the same template, say, block--footer-block.html.twig. What I tried is to use hook_theme_suggestions_HOOK_alter() to check where the blocks are located and add the region…
Jaguarundi
  • 11
  • 2
1
vote
2 answers

Create custom block in drupal 8

Custom Block Create button does not have in Block layout. Please see upper image. I create testing block in drupal 8. But "Create Custom Block" button does not show in Block Layout. It only shows in Custom Block library. When I create the custom…
May Phyu
  • 895
  • 3
  • 23
  • 47
1
vote
0 answers

Drupal 7 - View block is not getting displayed in entity field builder

I have created one view of display type block. but it is not getting displayed in entity field builder. Below is module we are using - https://www.drupal.org/project/efb I am attaching my view image. Is it permission issue ? Expected behavior is…
Kalashir
  • 1,099
  • 4
  • 15
  • 38
1
vote
2 answers

Display raw text from custom field in Drupal

I'm trying to render a Block's Field as Plain Text as I need it used as part of HTML, I've tried using |RAW however I read it was unstable + it didn't work haha! This is my existing HTML minified Read…
user5922518
1
vote
4 answers

Add a Flash video

I have been trying to figure this out for days. Hope someone can help. I am implementing a new theme for a site. I added the html to a page.tpl.php file, populated it with the appropriate variables, and it works OK so far. It consists of a header,…
John Rand
  • 995
  • 2
  • 10
  • 20
1
vote
1 answer

How to build a "block taxonomy tagging feature"?

First, I apologize the title is so vague. Its hard to explain what I want to accomplish. Anyhow, I want to build a template that requires a pool of nodes (Content Type A) to be presented along side the main content of a page (Content Type B). This…
chrisck
  • 169
  • 2
  • 18
1
vote
2 answers

Block in drupal - prints nothing, what's wrong with my script?

I have a block that I want to show edit and delete buttons for users with access, and other buttons for the rest of the users. This is the script I'm using for the users with update permission:
Toxid
  • 615
  • 10
  • 18
1
vote
1 answer

Scroll block with page in drupal

Is it possible that if i scroll down on drupal the block should also scroll along with the page. Because i have to display long results on the node and i want to scroll the block so that user can see the data on left sidebar everytime.
fawad
  • 1,323
  • 11
  • 31
  • 50