How to install drush in drupal

1. To install Drupal8.4+ you need to install drush 9. You can easily install it using composer. [sourcecode language=”bash”] composer require drush/drush [/sourcecode] 2. To be able to call drush from anywhere, you need to install the Drush Launcher by downloading – Phar file from https://github.com/drush-ops/drush-launcher/releases/latest. [sourcecode language=”bash”] wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.5.1/drush.phar [/sourcecode] 3. Make […]

Nasir Uddin June 12, 2013 1 Comment

Drupal drush command

1. Show drupal modules by specific characters drush pml | grep module_name* 2. Uninstall module from enable drush pm-uninstall module_name*

Nasir Uddin June 12, 2013 1 Comment

How to develop a custom exposed filter for node created date

Sometimes, we face drupal node filter by “This Month”, “Last Month”, “Current Year”. But how way we can solve this problem. Please follow below procedures… What query we have to use … For “This Month” [sourcecode language=”bash”] SELECT DISTINCT FROM_UNIXTIME(node.created, "%M") from node where node.type = ‘fund’ and node.created > UNIX_TIMESTAMP( LAST_DAY( DATE_SUB(NOW(), INTERVAL 1 […]

views aggregation settings to remove duplicate records

For drupal 7, for removing duplication row in views result i described step by step procedures in below.. You can apply GROUP BY or DISTINCT by enabling views aggregation settings to remove duplicate records. 1. Go and edit your view 2. In Advanced » OTHER section by enabling Use aggregation: Yes 3. In FIELDS or […]

How to load views by passing a argument in views programmatically

I will load views data in a module/theme function programmatically by passing taxonomy term id in a views argument by below views api.. [sourcecode language=”bash”] views_embed_view(‘contact’,’panel_pane_2′, $term_id); [/sourcecode] from in below views…

How to load field collection data programmatically in drupal 7

Always we have to face a hard works to get field collection data in views, node_load, etc. I am giving a example code in below for load field collection fields data in a entity. Here, entity is “Node”, Field collection field is “field_timeline” [sourcecode language=”bash”] $timelineData = entity_load(‘node’, array($node->nid) ); $node_data = $timelineData[ $node->nid ]; […]

How to develop a relationships between two/more content types by reverse node reference field of a field collection ( Part 2 )

For drupal 7 , i want to develop relation between content types by views Relationships . Suppose biography is content type and Fund is another content type. Field collection are in like below image… Here, biography node reference is presented in Fund content type. Like in below image… First of all, i will develop a […]

How to develop a relationships between two/more content types by reverse node reference field ( Part 1 )

For drupal 7 , i want to develop relation between content types by views Relationships . Suppose biography is content type and Fund is another content type. Here, biography node reference is presented in Fund content type. Like in below image… First of all, i will develop a views for biography. Like in below image… […]