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

learn more… | top users | synonyms

0
votes
1answer
21 views

Change structure of block content

I have a block like this: <section id="block-locale-language" class="block block-locale clearfix" data-thmr="thmr_23"> <h2 class="block-title">Languages</h2> <ul ...
0
votes
1answer
20 views

Change specific block look & feel

I have a block like this: <section id="block-locale-language" class="block block-locale clearfix" data-thmr="thmr_23"> <h2 class="block-title">Languages</h2> <ul ...
0
votes
2answers
27 views

How do I create a page (with a url) that displays only views blocks

I have been using views to create all of my pages. I am wondering if there is a way to set up a page (with url) that is initially blank. I want to use context to place view blocks on this page based ...
1
vote
2answers
21 views

Custom Block Content with HTML and PHP

I am having a lot of trouble understanding what is wrong with my code. I am trying to create a custom Facebook block, utilizing the Facebook Graph API. My module works to the extent that I see some ...
0
votes
1answer
38 views

Where I can write query in Drupal site

I created a page name like citylist.html in Drupal. I want to retrieve city data from the database using simple query in page level. I think it is not a proper place to write a query, because page ...
0
votes
1answer
26 views

Fatal error when altering the user login form

i want to customize login block in a fancy login box. i used this code in a template.php function bootstrap_form_user_login_block_alter(&$form, &$form_state, $form_id) { ...
2
votes
1answer
64 views

Drupal 8 Module layout best practice

I am trying to get to grips with Drupal 8s layout and and architecture. Having worked with Drupal 6 for the last 2 years I have become used to its procedural style, so I am finding the OOP approach ...
0
votes
0answers
19 views

Url called from flash asks from a logged user to login again

I have a flash animation in a block which has a link to a different page in my site. The problem is that even if the user is logged in my website, the link when it opens, asks for credentials again. ...
0
votes
1answer
30 views

Convert former embedded PHP code into a custom block module?

Had a Drupal site that used the php filter module. After realizing the security risk I started the process of fixing things up. Currently the last piece of code is a php snippet I embedded into a ...
0
votes
1answer
33 views

Illegal string offset block region

I've made a custom module for Drupal 6 that has a custom form, which works perfectly. I've tried to add the form in a block using the following code. function mymodule_block($op = 'list', $delta = ...
0
votes
1answer
13 views

How to theme a view block

I'm a drupal beginner. I'm using drupal 7 and views. I created a block using views in order to list my latest projects. I'm displaying the block in my home page. I would like to know how to override ...
0
votes
1answer
8 views

Add javascript scolbar & effects to Block from module

I have a block that was created with Social Feed Module. The block aggregate social feeds. I want to add a scroll-bar to the block it self. I have seen some ...
0
votes
0answers
24 views

How to add new blocks when “The block X was assigned to the invalid region Y and has been disabled”

I have inherited a site (in Drupal 6) and the original developers are completely out of the picture. I need to add a block but it looks like they've customized things and blocks are being rendered in ...
1
vote
1answer
35 views

how to give read more link in a block?

I have a views block which display user's detail like name, picture and about. i want to give a read more link in "about" field, by click "read more" link the trimmed "about" will open in the same ...
0
votes
0answers
26 views

how to create a block total viewed by the author on node detail pages?

I am working on it since last week but still could not able to get any solution. I have created a block which show author details on each node pages, now i want to display total number of nodes ...
0
votes
0answers
32 views

How can i display total number of node created by individual user? [duplicate]

I have created one block by using view, which display author details on each node page, author details block on each node Here is the link by which the block has been created,now i want to display ...
0
votes
0answers
25 views

How to output content use my custom way?

For example, I have two site (A & B), A is built by drupal. On site B, I wanna display a list of news from site A. I choose to add such code to B's page <script ...
0
votes
0answers
5 views

Controlling Access to Blocks

How can I restrict the Access to the blocks in my website depending on the roles ? ie only a particular role can see (edit view delete configure) a particular block and no one other than him can do so ...
0
votes
4answers
37 views

Display two Views blocks with equal height

I have created two Views Blocks "NEWS" and "BLOG", which resides side by side on my front page. Both the views have 20 contents (but can be any number) in it and a pager. How do I display contents ...
0
votes
2answers
23 views

Don't show block until after a number of comments

I have created a block and I don't want it to display until there are a number of comments posted on the node because if I just display the block the site will look ugly. How would I go on to make it ...
0
votes
2answers
35 views

Show block for specific content type programmatically

How can I show a block on a specific content type programmatically? I want in my image the 'basic page' selected. I used the xxx_block_info() function, should it set in here?
0
votes
1answer
25 views

Place a Page before Context Blocks

I want to achieve this result in my Drupal front page: [Headers] [Welcome Block] [View of contents] So I created a Welcome Page (as a Basic Page), and put it as a Front Page from site ...
0
votes
0answers
22 views

Block being rendered twice on a views page

I have created a view page '/searcher' which displays indexed results from search_api_solr queries - ajax is enabled for this view. I have also created a custom block which will be used to display ...
0
votes
1answer
13 views

How to add contents through block after enabling the blog module in drupal 7

Currently creating a single page responsive business website. Planning to add blog link to our site. For that we enabled the core blog module and added data. But we want to add the contents through ...
0
votes
0answers
44 views

Adding Search Block to Bootstrap 3 Navbar

The search block using the twitter bootstrap 3 theme doesn't show inline with the rest of the navbar. What is the trick to get this to show inline? I have tried to add it to the page.tpl.php without ...
0
votes
0answers
22 views

theming a block of a module: og extra's, node create links block

I am having trouble theming a block of drupal module. In this case it's the og extras module, the node create links block in particular. My aim is to print out the create links and some custom links ...
0
votes
0answers
19 views

Secondary Links shows up for anonymous

My Secondary Links are set to show User menu, which should show up only when logged in. I gave it a custom link to user orders page (which belongs to Commerce). So to give path to each users orders ...
0
votes
1answer
32 views

Trying to create a custom block

Hi I am trying to create a custom block but it is not appearing in the block listing is there something missing in my code. <?php $view = views_get_view('schedule_list2'); ...
0
votes
0answers
12 views

Replicate Module and its Web Services

I am using Social Timeline, which is great! The bad part is that it comes with one block and one configuration page that sets what the block will look like. Could I replicate this module? I know you ...
1
vote
2answers
61 views

how to display view block in node page

I have a block in view that is displaying the user details, i want to display that block in a nodes created by the respective users. i am successfully using this block in user page now i want it on ...
0
votes
1answer
27 views

Custom Block - How to get additional variables

I am new to Drupal and slowly getting my head around it. I'm using Pay to Publish module on my site, I've setup a custom block that gets recent posted advert (very simple) now I want to style the ...
0
votes
1answer
24 views

“Class not found” error when attempting to access inbuilt DateTime class [closed]

I am attempting to convert a working Drupal 6 module to Drupal 8 in preparation for the up coming release, and as an exercise in learning the new system. In my existing module, I do some calculations ...
0
votes
2answers
22 views

How can I have a block show only on the /user page, but only for users with specific role?

I have users with the role "authors" and a block in /user showing publications so that visitors can see the publications of every "author". The problem is that the block is showing at every user ...
0
votes
0answers
12 views

Show Views Block with Certain Filtered Results when Field Matching Term is Found

I have a hierarchical taxonomy going. It looks like so: Branch +Committee ++SubCommittee Branch is parent, committee is child and subcommittee is child of committee. I have a view ...
0
votes
1answer
20 views

Code for “All pages except those listed” in Show block on specific pages

While editing a block I want to use "Pages on which this PHP code returns TRUE (experts only)" at the same time support the URL's entered in "All pages except those listed" plus my own custom ...
2
votes
0answers
34 views

Show User Information in Block from View

I have a block that shows some data from the User area (People) in Drupal 7. I have a rewrite setup that shows "VACANT" if there is no user selected for the content type. When logged in, I see users ...
1
vote
0answers
16 views

I can't get the og_group_ref set in a node form rendered via a custom block

My block code is as follows: mymodule_block_info() { $blocks = array(); $blocks['my_contenttype_form_block'] = array( 'info' => t('My CustomContentType Add Form'), 'cache' => ...
0
votes
1answer
16 views

Show two copies of same menu

Let's say I have Main Menu and I want to show it in header and in footer, to achieve that I can use Menu Block module, but using it lets say I disable one link in Main Menu, it also disables it in the ...
0
votes
1answer
16 views

Customizing where to show block

Let's say I have nodes with the following paths: /chapters/university-of-florida/classrooms/class1 /chapters/university-of-chicago/classrooms/class2 /chapters/ucla/classrooms/cla I'd like to ...
1
vote
1answer
20 views

Form - Show partial form in block then populate full form with partial data

I have a content type with various fields. Now i would like to show a couple of it's fields in a block globally and on submission post that data to the full form page and pre-populate the already ...
0
votes
1answer
38 views

How to embed a quicktab instance in a page?

How do I can embed a qiucktab instance in page? I'm not going to create a region and assign the quicktab into that region. is there anyway to do such thing without using region?
0
votes
2answers
53 views

Adding an image within a header

I am new to Drupal and currently working on a theme from scratch. I have been using this tutorial to help me. I have got most the things working required for the site I am working on apart from the ...
0
votes
1answer
35 views

How to add page restrictions for blocks in frontpage?

I have several blocks in my homepage : 2 statics and 1 with a pager. I want to hide a static block when paging my homepage (after page "0"). I saw something similar in How can I show a block in a ...
1
vote
1answer
19 views

How to track location of a sign-up form in a block?

I have a newsletter sign-up form in a block that appears on many pages. When the form is submitted, I want to capture the current page. The block and form are created in code. In the submit function, ...
0
votes
1answer
36 views

Delayed error messages for webform blocks in template

I am printing a webform block in my node.tpl.php: <?php $block = module_invoke('webform', 'block_view', 'client-block-72'); print render($block['content']); ?> And when I ...
0
votes
1answer
24 views

How to automatically load block--[blockname].tpl.php to region--[regionname].tpl.php

I have multiple customized blocks with different content (eg. Advertisements, Quotes, Youtube videos, etc..) block--apple.tpl.php block--pineapple.tpl.php block--orange.tpl.php Question: How can I ...
0
votes
1answer
20 views

How to include a view in a specific region defined in a custom layout?

I defined a set of views that I would like to include in specific regions ordered in a particular way through a custom layout. However, the block menu does not allow me to select these regions. All I ...
1
vote
4answers
65 views

Including a PHP file in Drupal via BLOCKS, or REGION

Hi I am newbie in Drupal, I have problem about theming. I have a PHP file ads.php that contains random advertisements now just wondering what is the perfect way to include that ads.php Can I just ...
1
vote
1answer
188 views

How to load the images in views using ajax?

There is a website with rich content (high resolution images). I wish to load that view block contents (3 view blocks), but not the image, during the page load. Image should load in AJAX after the ...
0
votes
3answers
22 views

In Drupal 6 is there a way to edit custom blocks of text in a quick way?

I'm working on a client site that is Drupal 6 and many of the footer/header region areas have many blocks of text created via the blocks page. Its currently very cumbersome to go into the blocks page ...