Search code examples
drupaldrupal-7drupal-viewsdrupal-theming

how to use dedicated php file for Page in Drupal 7


I am very very new to Drupal 7 and am simply trying to create a new page that uses a dedicated .php page along with a custom page.tpl.php file.

Within the CMS of Drupal after creating a new "Page" within the content tab... I see this text under the Body textfield:

Use the syntax [[file-name.php]] to use the contents of a file in the theme directory.

My question is, how do I make this work? I have a products.php file within my theme directory, I have created the new Page called "Products" within the CMS, I have put [[products.php]] within the Body textfield... but no luck.

Can someone please tell me how to make Drupal 7 pull my dedicated products.php so that the CMS will pull the file contents into the Body textfield?

Thanks


Solution

  • I had the products.php within a folder of the theme. I had to specify [[pages/products.php]] instead of just [[products.php]].. thanks!