Ashesh
Ashesh

Reputation: 949

Using includes for templating a PHP site and javascript/css

I would using includes for templating a PHP website. I intend to create a header.php file which will contain the doctype, head tag, and everything upto the body tag. My problem is that I don't want the same title or same javascript/css files on every page. What would be a good way to make this more dynamic so that I can set the tile for a page and only include the javascript, css files that I want to include ? I wouldn't be using any frameworks or template engines for this project. So far I have come up with this,feedback would be greatly appreciated:

http://pastebin.com/drdKnEn2

Upvotes: 0

Views: 66

Answers (1)

simkeyur
simkeyur

Reputation: 36

I would suggest, keep it simple,,, dont use php function to include metaname and favicon nd stuff.

I would rather keep writing these stuff on every page... coz everypage on website is not the same... and if you are using dynamic php, there wont be too many pages! It will look neat and clear to understand/access.

Upvotes: 1

Related Questions