USING PHP SNIPPETS WITH THE FRONT_PAGE.MODULE

Probably the most common use of PHP snippets will be the front page of your site.

To use any of these snippets using the front_page.module (allows you to specify a "splash" page to your site and different front pages for anonymous/authenticated users) Simply follow these steps once you have the front_page.module installed properly:

Step 1: Go to ADMINISTER -->> SETTINGS -->> FRONT_PAGE

Step 2: In the text areas available, paste in your PHP Snippet(s).

Step 3: Select the ALLOW EMBEDDED PHP option.

Step 4: Select if you want a FULL/THEMED Front Page.

Step 5: Click on SAVE CONFIGURATION once you are happy with your front_page settings.

Comments

darumaki’s picture

I haven't been able to get php working on the front page, even though it's set up to do so.

Redheadriot’s picture

Same here.

tjanus’s picture

The php works in my case, but I cannot access any drupal variables from there. Even when declaring them as global :(

Norrin’s picture

... http://drupal.org/node/335766

Hope it helps you just as much as it helped me.