drupal
Drupal Source Control Strategy?
I think a good strategy here is to use the install profile API. With install profile API you can do most things that using the Drupal admin tools do. Most core forms simply set variables in the variables table. To be able to sensibly version your non content database contents i.e. configuration it is wise … Read more
Does Drupal comply with the MVC paradigm?
No, Drupal follows the PAC (Presentation-Abstraction-Control) model rather than MVC. There is an excellent blog post explaining this at Larry Garfield’s site.
How to display node/add/sometype form on another page?
module_load_include(‘inc’, ‘node’, ‘node.pages’); $form = node_add(‘nodetype’); $output = drupal_render($form); If your node form has a file upload widget, you should add the following lines to the menu array: ‘file path’ => drupal_get_path(‘module’, ‘node’), ‘file’ => ‘node.pages.inc’,
Using JQuery in Drupal 7
From the Drupal 7 upgrade guide: Javascript should be made compatible with other libraries than jQuery by adding a small wrapper around your existing code: (function ($) { // Original JavaScript code. })(jQuery); The $ global will no longer refer to the jquery object. However, with this construction, the local variable $ will refer to … Read more
How do I force the use of the desktop menu when the grid is fluid?
Try to use “vh or vw” if you need manipulation with browser size. Try to use “background-size: 100%;” on 100% pass needed value. On drupal if you are using module for output different menus and using different templates double check your conditions. Try to check your @media query’s in css on width size for this … Read more
Adding a class to “body”
In your theme’s template.php file use the preprocess_html hook: function mytheme_preprocess_html(&$vars) { $vars[‘classes_array’][] = ‘new-class’; } Remember to clear the caches once you’ve implemented the hook or Drupal won’t pick it up.
jQuery issue – # has no method
This problem can also arise if you include jQuery more than once.