Skip to main content
Home
Toggle menu
  • Home
  • Blogs

Drupal 7

How to add Welcome message on site

To show welcome message in Drupal we can identify whether user is logged in or not using simple code snippet below.
  • Read more about How to add Welcome message on site

How to use drupal_http_request()

Recently I was working on a project where I was wanted to make a request to another website to submit data from Drupal site. PHP provides very useful method for it i.e. cURL.
  • Read more about How to use drupal_http_request()

Drupal Commerce - How to change currency format

I've worked with Drupal commerce with almost 3 major project till now, and I'm seriously loving it the way it is flexible and configurable using Website UI and even with code. In current project which I'm working on was having some p
  • Read more about Drupal Commerce - How to change currency format

How to alter views exposed filter allowed value list

Just came across a situation, where wanted to alter the allowed values in views exposed filter depending on users who are viewing them. View allows site admin to expose its filter value to user, so they can apply different filters while viewing views output.
  • Read more about How to alter views exposed filter allowed value list

Programmatically output webform block

Webform module provides a way to create forms, which can be used as contests, personalized contact forms, or petitions, etc.
  • Read more about Programmatically output webform block

Get allowed values of select list field

Ever wanted to retrieve a list of allowed values of select list, here's a sample code:
  <?php
    $field = field_info_field('FIELD_NAME');
    $allowed_values = list_allowed_values($field);
  • Read more about Get allowed values of select list field

Programmatically render a block

Blocks are the boxes of content (such as "User Login" or "Who's online") that can be displayed in regions (such as footer or sidebar) on your page. Blocks are made available to your site most commonly by enabling modules.
  • Read more about Programmatically render a block

Removing extra empty row in unlimited value field on node edit

In Drupal the normal functionality of multi-value field on node edit screen is like this, it adds one more extra row where user can add data if they want or leave as it is if don't.
W
  • Read more about Removing extra empty row in unlimited value field on node edit

Programmatically render views in Drupal 7

Views can be used to display content as a page, block, etc. You can directly access URL to show page view content, you can add views block in any region if it is to be shown on sidebar first, sidebar second, content top, content bottom.
  • Read more about Programmatically render views in Drupal 7

Pagination

  • Previous page ‹‹

Monthly archive

  • June 2017 1
  • April 2017 1
  • January 2017 2
  • December 2016 1
  • October 2016 1

Pagination

  • Previous page ‹‹
  • Next page ››
sfy39587stp18