Correct way to print a block in a tpl file in drupal 7
To output a block content using php in any tpl file .e.g; page.tpl.php or any other tpl file, or even in a view area in drupal 6 $block = module_invoke('module', 'block_view', 'delta'); print...
View ArticleChange city text field provide by addressfield to select box
Addressfield is a common module, and used to gather information about user, and usually used with commerce drupal module, the default widget of the city is text field, however the module provides a...
View ArticleRemoving the text of the submit button in an exposed views form
In order to remove the required text of the submit button in the an exposed form for specifc view, we need to alter the view exposed form using a drupal module In your custom module implement the...
View ArticleSearch products by title making the search results classified by facets
If you need to replace the default core search by drupal and the and same time using a text filed as a facet, to do so : Make sure you enable the title for search in your search index. Change its type...
View ArticleRemoving image height width attributes in drupal
When you upload an image through the drupal, it comes with width and height attributes. If you are working on a responsive theme and need to remove the automatically generated width and height...
View ArticleTranslation the block subject
I have a multiple language website, translation works well except for the block subject, the solution was to copy the block.tpl.php from the module and put it in the templates directory of the active...
View ArticleFilter product entities based on language in views
If you have a view of the type’ product display’ and you want to filter content based on the current user language do the following steps: Enable the Content Translation module which come with the...
View ArticleWebform validation message shown after refreshing the page
In one of my template files I embedded a webform as a block programmatically using the module_invoke method $block = module_invoke(‘webform’,’block_view’,’client-block-6′); print...
View ArticleDrupal popup Login form using popup module
In fact drupal provides many modules/libraries to load a form like a login form in a popup, however in a website built by other developers, I found that they already use the popup module, so I decided...
View Articleload the edit profile form by ajax and submit it with ajax as well drupal 7
user-profile.tpl.php <div id =”my-test”></div> <div id=”justadiv”><a class=”clickme”> <?php print t(‘Edit’); ?></a></div> <script> (function($){...
View Article
More Pages to Explore .....