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
0
votes
1answer
180 views

Omit the Front Page when Using Contextual Filters?

Content on my site is set up via taxonomy term, and I've created a view using contextual filters which does a fabulous job of sorting all the content to the appropriate page. However, on the front ...
0
votes
0answers
289 views

Adding header to Quicktabs result

I am using Quicktabs to format the results of a view and it works fine. I created my layout so that my results will look like a table (with 3 columns). I need to add a header at the top of the rows ...
0
votes
0answers
280 views

Create dynamic links in block

How do you create a block with multiple dynamic links? If the url is http://www.domain.com/series/bomberman-jetters/node/add/gallery/82 then the 82 is varied depending what node your viewing. Also ...
0
votes
1answer
66 views

Block in Utility menu top only shows on home page

heres my site coonvalleytel.com/drupal I made a block with 3 pictures that are links to youtube, twiter and facebook. But they will only show when you are on the home page. Do you guys have any ...
0
votes
2answers
543 views

How do I add a template suggestion for a Views block?

I am very much so new to Drupal and have moved to this platform after working with Magento for 5 years. I am trying to create a template for a view. I have created the twig template under /templates/...
0
votes
1answer
184 views

Clear region with menu's per url cache

I have a region with menus, a menus displays depending on the url example if on the about page(sitename/about-us), display about menu and links as a sub menu. It works, but the problem is after ...
0
votes
1answer
7k views

How to detect mobile viewport with in twig?

Is there a way to detect screen display with in twig? I have a block and I want to render in a twig template using the twig tweak module, but only in mobile screen. It is surely possible to just hide ...
0
votes
2answers
233 views

Views block showing empty content on front end

I created a view to show a list of news items. I placed the view block in the content bottom region of the page. In the Views preview, it shows the results. However in the front end, the content is ...
0
votes
2answers
223 views

How to apply focus for specific tab in quicktab

I have used quicktabs to search my channels and profiles.I have set default tab "Channels/Videos" in quicktabs setting.When a user enters the text and selects "Profile" tab the focus automatically ...
0
votes
2answers
3k views

The block isn't shown on the front page

I have a view block that shows a sub-set of nodes. In the configuration page, the autopreview section shows content, so I know the filters for the view are set up correctly. I configured the block to ...
0
votes
2answers
478 views

Taxonomy hierarchy in filter block of views isotope?

How can I set the filter block to show a hierarchical taxonomy? As far as I can see there is only a flat list being built by default. How can I change this and apply the hierarchy of a taxonomy? This ...
-1
votes
1answer
26 views

Change Block view using custom Views

I have one content type(Contains Image & body field). for that, I have created a custom block view using Views. currently, it's showing content like on the left side the image is placed and on the ...
-1
votes
1answer
44 views

Add custom form to content type (Basic Page or any) using custom extesnion

I am new to Drupal. Actually, I have to add a custom form to the content type and it will be visible to the frontend user where they can submit their response. So I have created the form and save the ...
-1
votes
2answers
227 views

Can't edit block

I´m new with Drupal. I started a month ago with Drupal 8. Everything works fine. I had some own custom blocks. Then I added some javascript to one block. Immediately after that editing of the block ...
-1
votes
1answer
49 views

Create content that is related to blocks

I need you to help me with a type of content. I want to create a content that when you enter to publish it has related or referenced blocks created in the different views. Thus the administrator ...
-1
votes
1answer
25 views

Altering block to include another block

I am using the following code for a block. public function build() { $current_client = \Drupal::service('user.private_tempstore')->get('epensions'); $build = []; $build['client'] = ...
-1
votes
1answer
48 views

How to add a custom field image in a block, for a style background-image: url()

I'm trying to add a background image field to a block, when template-c is selected using the style property: <?php //here I can set if template AB or C 1,2,3 if ($rows[0]['field_template'] == '...
-1
votes
1answer
113 views

Render JavaScript in a block

The relevant items of the directory structure are the following: /template.php /js/custom.js The following code is located in template.php. On page render, this function gets the value of a taxonomy ...
-1
votes
1answer
146 views

hook_block_info_alter() is not working?

I am creating a custom Drupal profile and put down the following code. function erc_360_min_hook_block_info_alter(&$blocks, $theme, $code_blocks) { $theme = 'erc_generic'; $blocks['user']['...
-1
votes
1answer
71 views

Change, remove Login block title and local-tasks tabs

I have altered login form, removed fields description like this (mytheme.theme): function mytheme_form_user_login_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { ...
-1
votes
1answer
100 views

How to display Poll results on most recent poll block

I'm using most recent poll block to display polling in fronend. After i closed the poll, result is not showing. So how can i display the pol result in most recent block. Please any one help me out to ...
-1
votes
1answer
903 views

Pager doesn't work

I have the following view what also is rendered as a block. This view has a mini pager with default 3 items to show. When i check configuration of the block of this view it looks like this : I ...
-1
votes
1answer
526 views

How do I combine two blocks?

I have a view of taxonomy categories. I'm also using the built in search block, and the Bootstrap theme. Is it possible to combine those blocks into one block? I've tried creating a search view, ...
-1
votes
1answer
675 views

How to link block and view to basic page

Please tell me how to link a block and view with to a basic page. for example I want to add a block for featured service and assign with view, my problem is how to assign with a basic page.
-1
votes
2answers
98 views

Include a link of node with text in block body

How can I include a link to a particular page in the block body? I don't want to create a custom block.
-1
votes
2answers
787 views

Custom module to show and store the current user's email address in the database

I'm currently learning myself Drupal module development. I finished a tutorial for showing "Hello World!" in a block. And now I'm trying to show the logged in user's email and make a button to save it ...
-1
votes
1answer
1k views

How can I add custom styling?

I am using the Quicktabs module, which has built-in styles for its tabs. I would like to add my own custom styling. How can I do it?
-1
votes
1answer
281 views

Embedding a view block in template files makes output disappear

I have a block that I need to embed in a node's Body field. I've tried module_invoke() + PHP Filter, and I've also tried the Insert Block module. In both cases, whenever I embed a Views block, it ...
-1
votes
1answer
18 views

is my menu-block not properly inserted?

quite new to drupal and having a small issue i can't seem to solve. it's quite a lot to start to explain so i think it's best to just send you the link and explain the problem. take a look at www....
-1
votes
2answers
473 views

Why block with add node form returnes errors?

To show add node form in particular place I created a new block on the Block page with content: <?php global $user; module_load_include('inc', 'node', 'node.pages'); $node = (object) array('uid' ...
-1
votes
1answer
63 views

Views and QuickTabs Layout

I have a view that filters based on classes (ie., 2015, 2016, 2017, etc). I want to use QuickTabs to create a tab for each class. Is this possible?
-1
votes
2answers
438 views

How can I place blocks side by side?

I found a solution to my question but the problem is I don't know where to insert this code. Is there a way to input this code through the site or do I need to go into the css files to do this? http:...
-2
votes
1answer
35 views

Maestro workflow status block

After adding the Maestro status block to my homepage-content region, it doesn't display the status bar nor the status messages which were set in the workflow. It displays only the workflow title. 3 of ...
-2
votes
1answer
156 views

Why is my custom block template not being picked up?

I am working on a custom slider programmatically. I create a custom module (block_example) and make a block (BlockExample.php) and a twig file (blockexample.html.twig) and also a module file (...
-2
votes
1answer
834 views

How to create custom blocks for a custom theme?

I am new to Drupal and creating a custom Drupal theme from a HTML template. For some sections, I want to create custom blocks with some specific functionality. For example there is a counter running ...

1
11 12 13 14
15