Add a page using the PMF Template framework
It's easy:
- Build a template file and call it e.g. test.tpl and place it in the template/ folder:
<!-- Start Test Content --> <h2>{testTitle}</h2> <span>{testContent}</span> <!-- End Test Content -->
- Build a PHP file called e.g. test.php (the base name must match with that of the template file) and save it in the root of phpMyFAQ:
'; } $tpl->processTemplate ('writeContent', array( 'testTitle' => $testTitle, 'testContent' => $testContent ) ); $tpl->includeTemplate('writeContent', 'index'); ?>
- Register the variable e.g. "test" in inc/constants.php in the array $allowedVariables;
- Now you can access the new test page via index.php?action=test.