drupal

Articles about drupal

Controlling block page display options programatically

Apr
2015
06
You can set the region, the weight and the path of custom block in a custom module like this:
function hook_block_info(){
    $blocks = array();
    $blocks['my_custom_block'] = array(
        'info' => t('Custom Block Options'),
        'status' => TRUE,

Drush enable Theme and set to default

Mar
2015
12
Set your custom (or not) theme to default:
    drush vset theme_default THEMENAME
    drush vset admin_theme THEMENAME
For example:
drush vset theme_default bluemarine
drush vset admin_theme shiny

Super Quick Drupal 7 installation with Drush

Nov
2014
04
The fastest way to install a site is by using Drush. You can skip most of the other steps above too. Start with only the base of Drupal, which you can also get with Drush...
drush dl drupal --drupal-project-rename=example;
cd example;

How can I change a user's Drupal password with Drush?

Sep
2014
05
Sometimes you just need to download a website at your localhost environment and work on it until you update the live website. It's quite common that you forgot to ask about the admin's password or you just want to update and test other user accounts (if you are not using masquerade module).

Drupal 7 Read-Only Fields on Forms

Aug
2014
11
Let's say you want to have a form that the field is disabled, can take-update its value through a jquery-ui element but you do not want the user to be able to change the value of the field.

How to add a custom class to a view row ?

Apr
2014
07
Problem: I have a node default field called 'published' which is an list integer checkbox. When using Views to display a list of this content, I would like to add a css class to the item wrapper when that value is 1 like so:

Node count for taxonomy terms in Views

Feb
2014
19
Displaying the number of nodes related with taxonomy terms in views block (Drupal 7), you can do the following - 1. Create a views block 2. Under fields, add taxonomy term: Name 4. Under relationships, add taxonomy terms: content with term

How to setup a view in drupal 7 with taxonomy terms and show only the top level terms

Feb
2014
09
Let's say that i have the Vocabulary named: Earth and i have the continents as top level terms and then the countries as second level terms etc. So my tree would be something like this: Europe -Greece -Italy -UK -France . . . etc Asia -China -Russia . . . etc How do i make a view that shows only the the top level taxonomy terms ?

Pages

Subscribe to RSS - drupal
this is an arrow pointing back to the top of the page