I have a number of informational CMS “pages” added and I would like to automatically add a small piece of PHP to each page.
Can someone tell me the best way to do this?
I can do the PHP myself, I just need to know the template and how to edit it to include the PHP needed.
Thanks.
Anyone at all?
[quote name=‘argentice’]I have a number of informational CMS “pages” added and I would like to automatically add a small piece of PHP to each page.
Can someone tell me the best way to do this?
I can do the PHP myself, I just need to know the template and how to edit it to include the PHP needed.
Thanks.[/QUOTE]
In this case I advise you to add your php code to the “pages.php” file, located in the “controllers/customer” directory.
In order to pass the variable to the template you can use the following part of code:
$view->assign('page', $page);
It is not good and secure to use PHP code in the template.