![]() |
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
|
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. |
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.
|
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 :(
|
Yeah, that will really work great but I have the same issue with external scripts which I'm also trying to discover right now.
|
| All times are GMT. The time now is 03:14 AM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.