Blog

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,        'theme' => 'MY_THEME...
A quick and easy solution for centering any div horizontally and vertically .container {position: absolute;top: 50%;left: 50%;-webkit-transform: translate(-50%, -50%);-moz-transform: translate(-50%, -50%);-ms-transform: translate(-50%, -50%);-o-transform: translate(-50%, -50%);transform:...
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 Before you do that make sure it is enabled run drush status -- lists the current default and...
I am so used running drush ard etc these days that i have almost forgot the good all mysql dump database terminal commands. This is just for future reference in case i forget them somehow :) For Export:mysqldump -u [user] -p [db_name] | gzip > [filename_to_compress.sql.gz] For Import:...
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;drush site-install standard --db-url='mysql://[db_user...
Browscap module (https://www.drupal.org/project/browscap) is great when you want to have control on the layouts depending on the device that access your website. But what if you want more control? What if you care more for resolution rather than device? If for example you target desktop...
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...
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. For example you have a timer field where you have quarters of an hour and you want to let the user...
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: <li class="views-row views-row-1 views-row-odd views-row-...
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 5. Under contextual filter, add taxonomy term:...
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...
How can you modify the links in admin_menu? Through the use of the hook_admin_menu_output_alter() function. For example if you would like to hide the 'Tasks' and 'Index' Links from the admin toolbar or hide the structure / taxonomy Menu links and just add a custom Link using a drupal...
this is an arrow pointing back to the top of the page