Custom Module

Zyxware default image4
| 4 min read
In Drupal 7, a theme function is a PHP function that is used to wrap the output variables with HTML. For adding a theme function in our custom Drupal 7 module, we need to implement hook_theme(). A theme function is prefixed with 'theme_'. However, they can't override existing theme functions. Such functions are invoked using theme() rather than being directly called. Also, they are faster compared to the template (.tpl) file implementations.
Zyxware default image2
| 2 min read
As the name suggests, a preprocess function is a precursor to a theme function. It runs first, irrespective of the fact that the theme function can also be implemented as a template (.tpl file) rather than a function. Preprocess functions can be implemented in both modules and themes. However, the preprocess implementations from modules run first, and those by themes run only last.
Zyxware default image1
| 3 min read
Drupal 8 is the latest version of Drupal. There are significant differences between Drupal 8 and Drupal 7. Firstly, Drupal 8 requires the latest version of php5 to run. Drupal 8 uses a PHP framework called Symphony, which relies heavily on OOP. Another major change in Drupal 8 is the folder structure. In Drupal 8, all core modules are placed within core/ and all other modules are placed in root modules folder. Moreover, there are changes in the way modules are created. Read on to know how to create a custom module in Drupal 8.
Zyxware default image3
| 3 min read
You may be familiar with the theme information link in views. The theme information link in view tells us which files are to be modified, to theme the view. You could get more information regarding the view from, http://viewshelp.doc.logrus.com/help/views/analyze-theme. This is the case where we have a theme with us. But what if you don't have a theme and you still want to theme the view's result? Well, read on if you want to find out how to theme a view by adding a template file inside your custom module.
Zyxware default image4
| 3 min read
Drupal modules can be defined as a collective set of functions that can be used to create certain features. There are two sets of Drupal modules - 'Contributed modules' and 'custom modules'. Contributed modules are modules that are contributed by Drupal users for general use whereas modules which we create to achieve certain functions are called 'custom' modules. If you want to know how to create a module on your own in Drupal 7, you may read on.