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

learn more… | top users | synonyms

0
votes
1answer
23 views

Theming options (enable, disable, set to default) are missing. Also, the options on the gear icon on blocks. -Drupal 7

I am using Drupal 7 in Ubuntu 12.04 LTS My theming options such as enable, disable, set to default are missing. Already tried clearing the cache, just in case it can help. Also, the options on the ...
0
votes
0answers
11 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
22 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
5 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
19 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 ...
0
votes
0answers
12 views

Hidden Content in nodes of my basic pages. Who can I solve this problem? [on hold]

I have tried to check on the view permissions to see how I can troubleshoot this issue but I have failed. I need someone's assistance.
1
vote
1answer
20 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
30 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
16 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
8 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
15 views

My main information block on my home page dissapeared [on hold]

I can find it if I type in it's title, but it's on it's own. How do I get it back to the home page?
0
votes
0answers
4 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
15 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 ...
1
vote
1answer
26 views

Passing variable from preprocess block to the block body

There is a block which its body is produced by PHP Code. I need to set a variable before loading the block and use it in it. This is my code function THEME_preprocess_block(&$variables){ ...
0
votes
0answers
10 views

In module, callback data to jquery not received correctly

I have a custom module with a callback to some jquery (trying to refresh content of a block created via the module). I can get the jquery to be activated, but it does not seem to receive the data that ...
0
votes
0answers
17 views

Blocks/regions modifications

I am attempting to make a sub-theme of Corked Screwer. When I click Demonstrate block regions I see Banner, for example, but at Structure/Blocks Banner says no blocks in this region. Does that mean ...
0
votes
2answers
17 views

Content Region Not Displaying

I'm relatively new to Drupal and am just squashing bugs on my first site. I have a region that I declared in my theme.info file: regions[alert] = 'Sitewide Alert' and I have a block that has a ...
0
votes
3answers
45 views

Themes, blocks, and content … Oh my!

I am a newbie to Drupal/Acquia Dev Desktop. Please excuse me if this is a dumb question. I'm trying to grasp the relationship between themes (the one I chose is Corked Screwer), blocks, and content. ...
1
vote
2answers
11 views

How can I insert a variable from a preprocess function in template.php to Block Body in admin

Seems like a pretty easy thing to do, but I am having a hard time in using a variable from function theme_preprocess_block(&$variables, $hook) in template.php in a Block body in admin. For ...
0
votes
1answer
16 views

Assigned block system to an invalid region

I've renamed a region in my .info file by mistake. After clearing the cache with drush, the block I've attached to that region was disabled. Drush printed the following message: The block Nivo Slider ...
0
votes
1answer
70 views

Refreshing a block using AJAX

I am trying to apply the example from [the Flag API page][1] to refresh a block dynamically via AJAX. I am looking into customised jQuery code because my block is created via a module, not a view. I ...
0
votes
2answers
28 views

Drupal add link to another page in header of a block

In Drupal 7 I created a views page, and I want users to have the option to view the results either as a list, or with thumbnails (like on a lot of websites). The only way I can think of doing that is ...
0
votes
1answer
28 views

Add block programmatically in the right region

I have followed the instruction to create a new block here which is basically the same as here on SE. My block is indeed created but the region is wrongly set to "none" instead of "Content Post". In ...
0
votes
0answers
15 views

How drupal defines if block has to be shown on current page(path_alias)?

I have custom database table 'uid, image, title, pages' where 'pages' contain string with url aliases like 'page1\r\ncat1/*'. How should I make function which will find which rows should be ...
2
votes
2answers
75 views

Using token in Block title

I want to use token to show user name in block title. But it is not working. I tried like [user:name] Thanks in advacne
1
vote
1answer
30 views

How to refresh a coded block when a flag is clicked in it?

I have created a block in which I display a flag. All of it is done programatically. The content of the block changes depending on the flag status, but when a user clicks on the flag, it does not ...
1
vote
2answers
29 views

Fetch data from database and show in custom block [closed]

I have created my own simple block.I want to show some data from user table of database of logged in user to the block.I want to show it programmatically and not want to use any module. How can I do ...
0
votes
0answers
26 views

Can't save changes to a block

I just ran into a problem that I've never seen before in the 4 Drupal 7 sites I've built. I can't save text changes in the Block Body field. Here are the tests I've done: I've tried with two ...
0
votes
2answers
20 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 ...
1
vote
2answers
32 views

Can't see the block body

I'm working on a drupal site. Its already done by someone else but I have to change some things. I want to edit a block but when I want to edit, it doesn't show the block body. ...
0
votes
0answers
23 views

Drupal 7 Search Api facet widgets in multiple blocks

I am using Drupal Search Api module, I have configured all the needed stuffs. But right now am having the exposed filter only in the specified page. But I want to display the filters as well as home ...
0
votes
0answers
11 views

Programmatically create block for specific user [duplicate]

I want to create a block which only visible to some of the registered user only.How can I do that programmatically or from custom module?
1
vote
0answers
38 views

Programmatically show message to only specific user

I made a custom module where I dynamically fetched some username from database. Now I want to send some message or data those user's dashboard, meaning when the selected user logged in to the website ...
2
votes
2answers
38 views

Print just field data from a view into a block?

I'm trying to get a variable from a view to display on a block. For example "We have 200 blog posts" (200 being the variable). Right now I'm using the views_embed_view method. The problem is the view ...
1
vote
1answer
17 views

Theming blocks in Panels

Does anyone know of a module or some other way to allow users to customize blocks or panes (or even regions) in a panel on their profile page (i.e.: the authenticated user could change the color ...
0
votes
1answer
37 views

How to print a flag in a block programmatically?

I am creating a module which displays a block. I have created a flag within the module, and I am trying to display it through the block_view() hook. Currently struggling to get there... I am doing ...
0
votes
1answer
17 views

add code automatically for any article/post

I build a Drupal website with a customize theme, but in the last stand I need add a specific code after any post/article published on the site. For example: article 1 code article 2 the same ...
1
vote
1answer
34 views

Wrong caching of embedded views block

I am having trouble with the Cache API in Drupal 8. I embedded a views block with pagination through a field preprocess function into a node. When caching is off, I can normally use the pager and will ...
0
votes
1answer
19 views

Images placed in blocks do not show up on certain pages

I hope this is not a silly question. I have created some links to social media using images inside custom blocks. The images show up on every single page on my local testing server, but after ...
4
votes
1answer
62 views

Is it bad to add js and css in template_preprocess for a custom block?

If I load my page where my block is displayed as user 2 (any user besides user 1) my block displays correctly. If I reload the page my block doesn't display correctly and my js and css that was added ...
1
vote
1answer
16 views

blocks become hidden!

I created some blocks, and I assign them to regions for specific layout using context (and context_omega). now I can't see these assigned block in the admin/blocks. but I can see them being rendered, ...
1
vote
0answers
40 views

Blog contents not shown in custom theme. How to fix it? [closed]

I have purchased a drupal theme and installed it. In Bartik and other in-built themes everything works as expected. But if I set the purchased theme nothing shows in the client page. I have set the ...
0
votes
2answers
37 views

Using the Drupal 7's Block “description” field as a CSS class field

I need to add a css class to my blocks and I know I can install a module, but i rather not as it doesnt work with features. I was thinking of just using the block config's description field to hold my ...
1
vote
0answers
33 views

Drupal 8 static pages [duplicate]

How do i create Drupal 8 static pages that are translatable(3-lingual site)? I already have HTML code and about 15 static pages which some have dynamic content(latest news etc). What's the best ...
-1
votes
1answer
19 views

Difference between DRUPAL_CACHE_PER_PAGE and DRUPAL_NO_CACHE

What is the difference between DRUPAL_CACHE_PER_PAGE and DRUPAL_NO_CACHE? I'm developing a module that will generate 2 blocks for menu and it's sub-menu in different blocks and can't decide between ...
1
vote
1answer
74 views

Drupal 8 project structure

I was wondering what would be the best way to setup a Drupal 8 website that has about 15 mostly static pages in three languages? Static pages are somewhat similar but do contain different content. ...
0
votes
1answer
19 views

Insert code from module to .tpl [closed]

I'm trying to insert a code (a button) from a module to a specific place in a view (between the filters and the array). Does anyone have an idea of how it can be done ? Thanks
1
vote
0answers
13 views

Archive block giving SQLSTATE[42000] error using views 3

I'm trying to make an archive block in views to filter my posts by year and month etc. I'm following a tutorial: http://chrisshattuck.com/blog/how-create-monthly-archive-block-drupal-blog-views but I ...
0
votes
1answer
25 views

Show block on nodes and only for node author

I am building a simple classifieds style site. Instead of using straight email, I was thinking about creating a simple "make offer" node type. Create a few basic fields (reference to classified ...
0
votes
0answers
17 views

file block upload

I am trying to create a page with a block that allows a user to upload an image file. I have downloaded & installed Block Upload which, from the example on the project page, should do exactly ...