I had a requirement to add a multi-level responsive drop down menu in a Zyxware theme. Please do refer the below reference links to know more about responsive themes and free Drupal themes. So for that I had to edit page.tpl.php, page--front.tpl.php, style.css, template.php etc. First I added the following code to template.php of my theme. The steps that I followed here are,
Rules are very important and most common using thing in Drupal. We can create custom rules programmatically using the hook_rules_action_info. There is a useful hook hook_rules_action_info() provided by rules api to create custom rules programmatically. Using this We can use our custom functions to perform the actions that we require.
Meta tags are used for page description, ever wondered on how to add meta tags for the custom pages in Drupal 7. Using hook_html_head_alter() or using hook_preprocess_html() we could add Meta tags and title.
It was not easy to change calling order of hook implementations in Drupal prior to version 7. From Drupal 7 onwards you can control the order of hooks called for different modules. To accomplish it, there is a new hook introduced in Drupal 7. It is hook_module_implements_alter().
Have you ever felt the need to change the sorting order of a View?. The most common method to change the sorting order would be to edit the corresponding View template file. Now there is a more elegant solution for doing that instead of editing a view template file. Read on to know how to use Drupal hook_views_query_alter to change views sorting.
One of our clients was trying to upload a pdf file on a node page in their Drupal website. The file was more than 25 MB in size and Drupal was not allowing them to upload the file as it had crossed the max file upload limit and they needed this to be done very quickly. As we were in charge they requested to come up with an easy way to do that. If you want to now the easiest way to set the max file upload size in a Drupal site read on to know more.
Sometimes we use Drupal view_query_alter to add or modify the view's where clause. To add a new WHERE clause we may use add_where property. Whenever we use an add_where, it will create a WHERE clause along with an AND condition. There will be some cases were we need to use OR instead of AND. So if you want to know more about how to use OR clause in hook_view_query_alter, read on to know more.
If you are searching for a way to alter the output of a View after it has been rendered, you may find this article to be helpful. We had recently come across a situation which forced us to rewrite the rendered output from a View and we managed to find a useful hook - hook_views_post_render. It helped us to rewrite the output of the view. If you are facing the same situation in your Drupal site and would like to know how to rewrite the output of a View using hooks_views_post_render. then continue reading.
There may be many situations while working on a Drupal site where you need to create custom tokens for a variety of applications within Drupal. If you are faced with the same scenario in your Drupal site and want to know how to create custom tokens in a Drupal 6 website then read on to know more.