Message Text |
Paul,
Refering to: scripts.webmastersite.net/w...s/PHP_in_Templates-16.html
For the case we want to include some variable switches only available for admin, this at link edition template, and in case we whant to do it via inserting a .php file in the template:
If we just insert this on the edit template:
<?php include 'adminonly_edit.php' ?>
And having the 'adminonly_edit.php' file upladed to the templates directory,
we end with a
Warning: Unknown(adminonly_edit.php): failed to open stream: No such file or directory in /user/home/server/public_html/links/commonfuncs.php(737) : eval()'d code on line 705
If we insert this on the edit template:
<?php include 'http://www.mysite.com/links/templates/modified_templates/adminonly_edit.php' ?>
We reach the 'adminonly_edit.php' correctly, but the inserted variables we need to switch are not interpreted as variable names and they are just shown as {LINKVARIABLENAME} . This for preexisting variables and also own variables.
Could you please advice me what would be your recomendation for the best way to include the file and the way to have the variables available at the template.
Thanks. |