Drupal interview Questions and Answers
Q1)What is content type in drupal ?
Answer:- Content type is used for inputing data it is collection of different data type fields .The data entered through content type can be seen the end user.
you can add more content type in drupal while there is some in built also available like basic page etc.You can also modify its fields In other words content type
is like a form through which a user having permissions can enter the data and end user can view to it.
Q2) What is taxonomy in drupal ?
Answer:- Taxonomy is used to categorize the content in drupal you can also make a relation between content by using this taxonomy,for example in drupal you can
add vocabulary and assign terms to it and those terms you can use for your content, base on the content having the terms you can relate the data.
Q3) What is module in drupal?
Answer:- Module is used to extend the functionality of drupal there are some core module available with the download of drupal and you can also used contributed module for these you have to download and install to these modules.
Q4) What are roles in Drupal?
Answer:- Every user come to drupal site has an role if the user is not logged in is anonymous user having user id 0 and the user which is logged in will have user id greater than 0 . you can also create more roles in drupal .
Q5) Explain Permissions in drupal?
Answer:- In drupal a user must have permission to do something for example if a user want to view the content than he must have view content permission .you can also assign permissions based on the user role .
Q6)What is node in Drupal?
Answer:- A node is content created using content type or you can say when we save data through content type it will be saved as node .This node will have a node id that is used for further operations of content like view,edit, delete etc.
Q7)What are view in drupal?
Answer:- Views are used to show the content in different different formats it is best module available in drupal to display the content you can show content of nodes at one page by calling the content of same type nodes or based on any relation .
Q8) What are blocks in drupal?
Answer:- Blocks are used to display content at different places you can show content in blocks menus in blocks or these can be module driven or admin created dynamic modules
Q9) What are the regions in drupal?
Answer:- content in drupal is displayed in different portions of the page like header,footer ,content ,side bar etc these are the regions where we place the content for example to show a block it must be assigned to a region.
Q10)What are most commonly used cms?
Q11)List few commonly used SEO modules.
Q12) What are hooks in Drupal?
Answer:- Module are dependent on hooks . Hooks are used by modules to interact with the drupal core.For example we have mymodule.module file in this file we will have mymodule_menu function so here mymodule is module name and menu is hook which will be used for defining menu links.
Q13)What is use of rules module in drupal?
Answer:- Rules modules is for admin to define action for different conditions like you need to do something on the content has been saved event you can do this by using Rules module and define some action that will be executed on the event of saving of content .
Q14) How to define regions in drupal ?
Answer:- To define new regions in drupal you have to go to your current activated theme directory’s .info file and write these lines
regions[content] = Content
regions[help] = Help
this will create two regions Content and Help .You can use assign blocks to these regions.
Q15)What is use of Drush module?
Answer:- By using Drush module you can run drupal command line it is command line shell and unix based interface for drupal.
Q16)How to make a module ? What are the main files required to make a module in Drupal.
Answer:- Module is used to extend the core functionality of drupal .you can make it easily for basic purpose and expand its functionality when you more familiar with this these are the main files required for making a drupal module:
a) make a direcotry of module name according to the name of your module and place it in sites/all/modules .
b) mymidule.info — this file defines name and package where the module to be list in drupal
c) mymodule.module — main file for module where all the functions will be define.
these are main files for making modules but you can add css and js files if required here mymodule is thename of module you can change it accordingly.
Q17)What is Cron?
Answer:- It is basically a aciton to be triggered periodically . In Drupal you can run cron by going to admin/config/system/cron .
Q18)Where is the Setting files placed in drupa?
Answer:- Setting file is placed at sites/default/settings.php .Here you can define databse credentails and other basic settings .
Q19)How can we add a PHP Code while creating a Node in Drupal? What module needed for this?
Answer:- For adding php code in a file you need to enable php filter module and after that when you go for create content then you can select filter to php filter after body and write php code within tags.
Q20)What is PDO?
Answer:- PHP Data Objects it is consistent way to access database.