The benefit of drupal_is_front_page function an example Nicola Rainiero Sun, 06/21/2015 - 09:08
The benefit of drupal_is_front_page function an example

Thanks to this function I could re-activate the last version of MathJax module that gave me a lot of problem only in the front page of my Drupal 7 website. In the post I will describe how I have fixed this issue using the drupal_is_front_page() function with a few lines of PHP.

Spritely: corrections and adjustments

Submitted by Nicola Rainiero on 2012-07-15

I presented it as a interesting resource to layout design of your web site, I showed a working example in spite of a my error in template page definition. Then I conclude the review with another insert mode and an unfruitful try to install it as a module.

After the Spritely: an example in 4 steps article, I convinced myself that the procedure of inserting animation was wrong, because in Drupal literature you use another form. So when I saw in the bottom of the page the final text twice, I thought it was a problem of spritely. However it was my fault, like I found in another article with comments.

In these pages I read a partial HTML comment, "Mio codice -->", an old code forgot in page.tpl.php. In the specific case the original Drupal code to print the Welcome in NAME OF YOUR SITE in the front page, when content is empty. Once cleaned this template file, the problem was disappeared and animation works very well.

Second insert mode

I tested another type of insertion using the instructions found in HOWTO: Add a jQuery effect, but the final result has two disadvantages:

  1. at the first loading, Drupal shows this amusing warning:
  2. the comment form looses the WYSIWYG editor.
    standard comment form altered comment form

This is the example and my code:


Fatal error: Call to undefined function drupal_add_js() in /membri/rainnic/modules/php/php.module(81) : eval()'d code on line 56