Menu icon Foundation
Problem with Panini in latest version

I am using the Zurb template and in one of my files I use the #ifpage test with a php file. In the past this has always worked as long as I included the php extension. In the newest version of the zurb template using foundation 6.5.1 it no longer inserts the contents of phpvars.html.  A sample of the test I used is shown below

{{#ifpage 'contact.php'}}
  {{> phpvars}}
{{/ifpage}}

ZURB Templatepaniniifpage

I am using the Zurb template and in one of my files I use the #ifpage test with a php file. In the past this has always worked as long as I included the php extension. In the newest version of the zurb template using foundation 6.5.1 it no longer inserts the contents of phpvars.html.  A sample of the test I used is shown below

{{#ifpage 'contact.php'}}
  {{> phpvars}}
{{/ifpage}}
Rafi Benkual 10 months ago

Have you tried with just the page name?

George Benthien 10 months ago

With just the page name the test has always only worked for html files and that is still true. The test used to work with php files if you included the .php extension on the file name. Now even that doesn't work.

George Benthien 8 months ago

One way around this problem is to introduce a variable named php and test on that. Here is a sample

{{#if php}}
  {{> phpvars}}
{{/if}}

Then set php to true in the front matter of the php files. For example

---
php: true
---

It is not necessary to set php in the remaining html files as the default value for php is false.