How to use the PHP Snippets with the front_page.module

Last modified: March 4, 2008 - 11:55

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.

I haven't been able to get

darumaki - August 20, 2008 - 01:32

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

Same here.

Redheadriot - October 30, 2008 - 16:16

Same here.

PHP snippets on the front page

tjanus - November 13, 2008 - 11:28

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

Have a look at this issue ...

Norrin - November 18, 2008 - 14:56

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

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

 
 

Drupal is a registered trademark of Dries Buytaert.