Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Template design and Front-End Code

Post Reply
 
Thread Tools
  #1  
Old 12-14-2008, 07:49 PM
impete82 Offline
forum loafer
 
Join Date: Dec 2008
Posts: 10
having php template files?

i want to use php include so i don't have to change each menu whenever i make one little change, how can i go about using .php instead of .html on my template pages? unless there's a different way of doing this
Reply With Quote
  #2  
Old 12-15-2008, 04:04 PM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
PHP is not supported in templates. There is however a way to fix this. Create an addon in PHP that creates a menu.

Include a tag (e.g. <MY_MENU>) in the HTML template files and let the addon replace the tag with the actual HTML code.

HTH.
__________________
My photoblog, powered by PixelPost 1.9 dev SVN | My Pixelpost Addons | My Cool Photoblog profile
Reply With Quote
  #3  
Old 12-16-2008, 02:33 AM
dakwegmo's Avatar
dakwegmo+ Offline
Team Pixelpost
 
Join Date: Jul 2005
Location: West of Between
Posts: 689
You can also add header and footer files to the template directory, so that you don't have to repeat the code on every page. Just create header.html and/or footer.html and place them in your template folder. They'll show up at the beginning and ending of each page on your site. Remember to remove the headers from each of your _template files or you'll have duplicate information on each page.
__________________
My Photoblog
If you find my help useful please consider feeding the PixelPost Kitty
If you're short on cash just feed my ego
Reply With Quote
  #4  
Old 12-16-2008, 02:29 PM
impete82 Offline
forum loafer
 
Join Date: Dec 2008
Posts: 10
you know, that's what i did after reading it somewhere on the forums after posting this thread it's working great (using the header.html & footer.html files) but there are some external scripts i'd like that use php also, for which i guess i'd have to learn how to write a addon hehehe
Reply With Quote
  #5  
Old 01-30-2009, 05:57 AM
joelpietersen Offline
forum loafer
 
Join Date: Jan 2009
Posts: 1
Yeah, that will really work great but I have the same issue with external scripts which I'm also trying to discover right now.
__________________
If you can't make it good, at least make it look good.
everquest platinum
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 12:21 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs