Drush block-disable

Uit De Vliegende Brigade
Ga naar: navigatie, zoeken

drush block-disable is onderdeel van drush_extras. Drush_extras heeft last van de Drush-loop. Gebruik van block-disable is daarom vaak al snel te veel werk.

Voorbeelden

drush block-disable powered-by
drush block-disable login
drush block-disable node recent
drush block-disable comment recent
drush block-disable syndicate		
drush block-disable user new
drush block-disable online

Namen van blokken achterhalen

Hierboven kun je zien dat verschillende blokken identieke namen hebben. In zulke gevallen moet je module en delta specificeren. Allebei zijn het de namen van kolommen uit tabel block. Enkele SQL-queries die kunnen helpen:

select * from block;
select module, delta, status from block
select module, delta from block where status = 1;
select module, delta from block where status = 1 and delta="new";

Ter illustratie:

mysql> select module, delta, status from block;
+----------------+-------------------------+--------+
| module         | delta                   | status |
+----------------+-------------------------+--------+
| system         | main                    |      1 |
| search         | form                    |      1 |
| node           | recent                  |      1 |
| user           | login                   |      1 |
| system         | navigation              |      1 |
| system         | powered-by              |      1 |
| system         | help                    |      1 |
| system         | main                    |      1 |
| system         | help                    |      1 |
| user           | login                   |      1 |
| user           | new                     |      1 |
| search         | form                    |      1 |
| comment        | recent                  |      0 |
| node           | syndicate               |      1 |
| node           | recent                  |      1 |
| shortcut       | shortcuts               |      1 |
| system         | management              |      1 |
| system         | user-menu               |      1 |
| system         | main-menu               |      1 |
| user           | new                     |      1 |
| user           | online                  |      0 |
| comment        | recent                  |      1 |
| node           | syndicate               |      0 |
| shortcut       | shortcuts               |      0 |
| system         | powered-by              |      0 |
| system         | navigation              |      0 |
| system         | management              |      0 |
| system         | user-menu               |      0 |
| system         | main-menu               |      0 |
| user           | online                  |      1 |
| locale         | language                |      1 |
| locale         | language                |      0 |
| admin_language | admin_language_switcher |      1 |
| admin_language | admin_language_switcher |      0 |
| commerce_cart  | cart                    |      1 |
| commerce_cart  | cart                    |      0 |
| admin_language | admin_language_switcher |      0 |
| comment        | recent                  |      0 |
| commerce_cart  | cart                    |      0 |
| locale         | language                |      0 |
| node           | recent                  |      0 |
| node           | syndicate               |      0 |
| search         | form                    |      1 |
| shortcut       | shortcuts               |      0 |
| system         | help                    |      1 |
| system         | main                    |      1 |
| system         | main-menu               |      0 |
| system         | management              |      0 |
| system         | navigation              |      1 |
| system         | powered-by              |      1 |
| system         | user-menu               |      0 |
| user           | login                   |      1 |
| user           | new                     |      0 |
| user           | online                  |      0 |
| admin_language | admin_language_switcher |      0 |
| comment        | recent                  |      0 |
| commerce_cart  | cart                    |      0 |
| locale         | language                |      0 |
| node           | recent                  |      0 |
| node           | syndicate               |      0 |
| search         | form                    |      1 |
| shortcut       | shortcuts               |      0 |
| system         | help                    |      1 |
| system         | main                    |      1 |
| system         | main-menu               |      0 |
| system         | management              |      0 |
| system         | navigation              |      1 |
| system         | powered-by              |      1 |
| system         | user-menu               |      0 |
| user           | login                   |      1 |
| user           | new                     |      0 |
| user           | online                  |      0 |
+----------------+-------------------------+--------+
72 rows in set (0.00 sec)

</pre>

Zie ook

Bronnen