While working with entity, I always had a doubt as to why we use Entity and Entity Field query except Db_select() in Drupal. It is a great and fast way to organize and extract our data in Drupal sites. Here are a few more points to support these concepts :
My last work was related to theming a Drupal website. While theming I've faced a major issue ie., in different OS and different browsers the styling of pages have slightly different changes .
How to solve this issue?
Sometimes, we may come across a situation where we need to exclude a particular page from being indexed. We had a similar requirement in one of our projects where we had to exclude home page from being indexed by apache solr search. Read on to know how we executed it using hooks provide by apachesolr.
I had a requirement in one of my Drupal project to generate PDF from HTML. I had implemented the PDF file from HTML using the module MPDF. Let me explain you the following configurations for its working :
Drupal webforms are used to create custom forms in site, mainly for the surveys functionality. We can take the submissions results and analyse the averages of the submissions. Here we got a client requirement that he had to give a set of questions to the users to his users and he wants graphical representation of the submission results.
The purpose of hook_file_download is to Control access to private file downloads and specify HTTP headers. The hook_file_download_access is restrict the access to certain files based on the entity type. e.g.,
only users with access to a node should be allowed to download files attached to that node.
We had a requirement to show the group field in user registration form using Organic groups. Inorder to show group field in user registration form first we have to install the Organic Groups module (OG), Organic groups register module and create an Organic Group.
Creating a module by ourselves, or a new requirement by client would let you to learn more, to research more. One of the latest requirement was to AJAXify a form. To do AJAX-ification was always a troublesome for me.
To replace a div by another on submitting a form always used to top the list of requirements. So I've choose to share how to use a handy command provided by ajax to replace a particular div by another.
We were on a venture to convert all our Drupal 7 themes to their responsive versions and we got stuck in between. The issue was with the main menu that it was not displaying sub links. We have gone through the code carefully and we found that only the top level menu items are being set to the main menu variable. To render all menu items from main menu, we should have defined it in theme's template.php file.
l() function is a beautiful thing available in Drupal. It is a simple and secure way to create an HTML anchor tag. Usually we think of l() function to format an internal anchor tag which supports things like clean URLs. You can still create an external URL link with the l() function as an anchor tag.
Media module offer an extensible framework for managing files and multimedia assets, regardless of whether hosted on your own site or a third-party site - it is commonly called as a 'file browser to the internet'.