change Views title by programmatically in drupal

In some cases, we need to modify the title of the page, created by the views. We can implement the same using hook_views_pre_render in a custom module.

function mymodule_views_pre_render(&$view) {
  if ($view->name == 'myview' && $view->current_display == 'mydisplay') {
    $title = 'Title';
    // Your code to set $title here
    drupal_set_title($title);
  }
}

Context

Context is an alternative to drupal's default block system. It allows site administrater to manage contextaul conditions and reactions for different portion of the site. You can think each context as representing a “section” of your site. For each context, you can choose different conditions and reactions.

Many sites are using the context module rather than drupal's default block system. In this tutorial, we are going to show you how context works when block is visible on only one page.

Step 1: Download and install context 

What is patch in drupal ?

A patch is a file that consists of a list of differences between one set of files and another.All code changes,additions or deletion to Drupal core contributed modules/themes between developer are done through patches.

The differences are presented in a structured, standard way which means that a program (known as patch) can be used to apply the changes to another copy of the original file.

Node object reference drupal 7

 $node - Node object 7.x

$node->nid

Node ID.

$node->vid

Drush

Drush is a command line shell and scripting interface for drupal. Drush makes the life easier for the developer who love to work in command prompt.
It allow you to search on drupal.org, install drupal, install modules, enabled modules, updrade site, re-install site and much more.

Installation in windows:

Creating drupal installation profile

Drupal installation profile consisits of drupal core, contrib modules, themes and pre-defined configuration of the site. It provides the specific feature or functionality of the site for specific purpose or requirements of the site. It provide the functionality to quickly set up complex, user-specific site in fewer steps rather than installating and configuring the drupal modules individually.

Importance of Static Keyword in Java

Static means one per class, not one for each object no matter how many instance of a class might exist. This means that you can use them without creating an instance of a class.Static methods are implicitly final, because overriding is done based on the type of the object, and static methods are attached to a class, not an object.

How can we embed views into content?

test

To insert views into node content, we use "views_embed_view" function. This is a simplest solution to inset views into node content. This function does not display the title of the view.

{syntaxhighlighter brush:php;} views_embed_view($name, $display_id = 'default', $arg) {/syntaxhighlighter}

$name : name is the machine name of the view to embed.

How can we embed block into content?

if you want to embed the content of block into the a node, custom block or page template, you can use "module_invoke" function of the drupal as.

{syntaxhighlighter brush:php;}
$block = module_invoke('module_name','block_view','block_delta');
print render($block); {/syntaxhighlighter}

Menu Access in drupal 7

Menu on a website is collection of links which allow visitors to navigate through website. Menus are important aspect of the website, as it not only allow vistiors to navigate through website, but also decides the design and layout of the website.

In the Drupal CMS, menu module provides an interface which allow administrator to manage the menus of the website. Each menu in the site generates a block with same name in the admin section. Administer can display the menu block in any section of the website.

By default, Drupal provides three menus in the admin

Pages