Tag Archives: Drupal

When you output a Jump Menu from a View in Drupal 6, it displays & instead of the ampersand. Therefore ‘Terms & Conditions’ appears as ‘Terms & Conditions’ in the menu. The following bit of PHP code fixes this problem: … Continue reading

Posted in PHP, Snippet Library - PHP | Tagged , | Leave a comment

The PHP code snippet below shows how to add a GROUP BY clause to a Drupal 6 View. function hook_views_pre_execute(&$view) { switch($view->name) { case ‘Services2′: $search = array(‘ORDER BY’); $replace = array(‘GROUP BY node_data_field_parent_service.field_parent_service_nid ORDER BY’); $view->build_info['query'] = str_replace($search, $replace, … Continue reading

Posted in PHP, Snippet Library - PHP | Tagged , | Leave a comment

I was recently asked to create a mechanism in Drupal 7, so that a client could add member only content to their Drupal 7 web site. The content was to be added periodically by the company in the form of … Continue reading

Posted in PHP | Tagged , | Leave a comment

I recently had to add a member only section to a Drupal 7 web site. A problem I came across is that out of the box Drupal displays the User page after successful login and the member pages where not … Continue reading

Posted in PHP, Snippet Library - PHP | Tagged , | Leave a comment