PDA

View Full Version : Can't Use PHP in Templates?


esoteric
05-17-2008, 05:34 PM
Hello, I don't know if this is a 1.7.1 issue or just a regular issue (ie: my own issue cause I'm messing around :) ).

Anyways,

I wanted to use some PHP in my template (for example, I wanted to break out my navigation and footer into separate files so that when I make a change it's reflected across all of the pages).

So:

<?php include("navigation.php"); ?>
<?php include("footer.php"); ?>

When I refreshed, my navigation and footer vanished. So I checked the source in Firefox and there are the two php commands, unrun.

Is it not possible to put PHP into the template files, or am I just not knowledgeable enough to know what's really going on?

Thanks!!!

Dkozikowski
05-17-2008, 05:44 PM
Pixelpost never allowed direct php in templates. Instead you must create addons to include PHP code.

You can find the documentation in the pixelpost package.

esoteric
05-17-2008, 06:01 PM
Oh shoot, that's unfortunate. At least there aren't a lot of pages to update.

Thanks for the quick reply.

dakwegmo
05-18-2008, 01:32 AM
PixelPost also has functionality to include the same header and footer on every page. This feature is also documented.

esoteric
05-18-2008, 04:26 AM
I will check out the docs more thoroughly, thanks.