drupal 8 disable twig cache, drupal 8 twig template cache disable, drupal twig debug

Originally posted on phpcoderblog:

– twig settings:

– go to /sites/default/services.yml and set config to:

debug: true
auto_reload: true
cache: false

P.S. `debug` is optional here. If `true` it provides additional information. To see that information go to source code of the page.

* IMPORTANT NOTE: By default, Drupal caches any rendering it performs for blocks and entities, to speed up subsequent page loads. This means that changes to Twig templates for these will not take effect immediately. There is no way to disable this currently (8.0.0-beta9), maybe they will fix it in future releases.

View original

What’s new in Drupal 8 and how you can contribute

Originally posted on Ashwini Kumar:

Hey all now days Drupal community are very hard at work in developing Drupal 8 . If you are passionate about Drupal and want to contribute to Drupal 8 and not finding any source to start then this is blog can help you.

What we will cover in this blog :-

  1. How to take Drupal 8 stable core to your local machine and start developing with it .
  2. What’s new in Drupal 8 ?
  3. Some explanation of changes with code.

Below are the steps to setup Drupal 8 stable core to local machine . I am hoping you have GIT installed in your machine .

  1. git clone --branch 7.x http://git.drupal.org/project/drupal.git
  2. cd drupal
  3. git checkout 8.x

If you want to go back to your D7 version just do ” git checkout 7.x ” . For updating your Drupal 8 core do “git pull ” . It will update your Drupal…

View original 291 more words

How to make custom behavior in Openlayers module with Drupal 7

Originally posted on Ashwini Kumar:

Drupal with Openlayers

Couple of days back I was working with Openlayers in one of my project in D7. I got stuck with some functionality which forced me to make custom behavior which should work with Openlayer module in Drupal 7. I found Openlayers has very less documentation so I thought to write this blog. I will make some introduction about how to start with creating custom behavior which work with Openlayers. I am not focusing on some particular functionality but on giving base to your functionality.

I am assuming you know how to configure Openlayers and display map in Drupal 7.  So , here’s the situation you faced that you need to achieve some functionality which Openlayers don’t provide and then you have to create some module which should work with Openlayers.

Next step is to make a custom module . Go to sites/all/modules/ and create your module directory containing files

  • module_name.info

View original 379 more words

Featured Image -- 490

Drupal 7: Manually update jQuery version

Originally posted on Old Wild Issue:

Drupal Today for a customer I had to use a special plugin for jQuery that needs a jQuery version equal or major than 1.6.1.

As you know Drupal 7 is shipped with jQuery 1.4.4 and so is not ready for the plugin I need to use, there is a plugin that update jQuery and jQuery UI but where is the fun?

The procedure is pretty quick:

  • Download the jQuery version you need from from the official source.
  • Place the jQuery version you downloaded in your theme js’s folder (like MYTHEME/js/).
  • Create/Modify your theme’s template.php file as described below.

That is.

Now for the template.php, you need to use the hook_js_alter to replace the native jQuery:

After we clear the cache we will have the new jQuery version.

Keep in mind that changing the jQuery version may create some incompatibility issues with the other Drupal core scripts.


View original