Drupal 7

Using db_merge query. Insert or Update

Sun, 07/21/2013 - 10:09 -- admin

A use-case that we generally come across in most of the projects is
[geshifilter-code] if (there is an entry for the key[eg :nid, edi]) { update a few field for the entry } else{ insert a new entry with all the values } [/geshifilter-code]
But for implementing the above we need to write one SELECT operation for checking, one INSERT operation and one UPDATE operation.

In Drupal all of this can be done in a single function :)


Drupal 7 Tutorials : How to create a related content block using Views 3

Tue, 01/22/2013 - 01:43 -- admin


Views 3 has quick view mode, where you can select the basic settings of your view from the easy admin interface. 

  • You can select the base table of your view(content, comments, orders and so on)
  • You filter by content type.
  • You can order by the default fields from the base table. 
  • You can choose to create a page, table or any other display.

Themeable items in Drupal

Thu, 01/10/2013 - 20:31 -- admin

There are various things that needs design in Drupal. We generally call it themeable items. If you are lucky(read as rich) enough to have an external agency do the designs for you, then make sure that you get the desgins of the following items done on a single design page. It is generally called Typography desing page in the desgin circles. There are few things that are particular to Drupal but most of them are generic to any Drupal site.


Using a single template file for multiple views

Sun, 12/23/2012 - 01:58 -- admin


Is your templates folder full of view template files and you are failing to keep track of it? 

The most probable reason is that you are creating multiple view template with same contents but different names, just make sure that template is being called in all the veiw. Its high time you do it the smart way.

Note down all the views which are using these templates with the same contents.

Click on Edit name & description and add a new tag, lets call it "firstset"

Some frequently used commands in Ubuntu Linux for SQL and DRupal

Tue, 10/04/2011 - 14:39 -- admin
To create a database, to create a user and then to give all the permissions on that database to the user.

create database my_database_name_to_be_created; 
create USER 'username_to_be_created'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON  my_database_name_to_be_created.* TO 'username_to_be_created'@'localhost' ;

Powered by Drupal
Subscribe to Drupal 7