konetch Posted March 29, 2009 Share Posted March 29, 2009 I'm new at php and want to change my current html page to php. This question is probably very simple and unintelligent, but I need to know how to create an external .php file that loads on every page. But, I need each page to look slightly different. I want the logo, the navbar,the background and the footer to all look alike on every page, but want the content to be different. I'm not sure if this is very clear? So, if you need me to clarify the question I will try. Thanks -Alex Konetchy Link to comment https://forums.phpfreaks.com/topic/151573-solved-help-for-someone-new-to-php/ Share on other sites More sharing options...
genericnumber1 Posted March 29, 2009 Share Posted March 29, 2009 A simple solution is to simply require the header/footer/etc. A more complicated, but more versatile solution would be to use a template engine. Hopefully this will get you googling for more info Link to comment https://forums.phpfreaks.com/topic/151573-solved-help-for-someone-new-to-php/#findComment-796064 Share on other sites More sharing options...
konetch Posted March 29, 2009 Author Share Posted March 29, 2009 yeah. the require() would work. but i want the site to look more connected. can you give me some more information on the template engine. is it basically the same thing as joomla or wordpress? thanks Link to comment https://forums.phpfreaks.com/topic/151573-solved-help-for-someone-new-to-php/#findComment-796067 Share on other sites More sharing options...
genericnumber1 Posted March 29, 2009 Share Posted March 29, 2009 Not really, wordpress and joomla are CMSes, though they probably use a template engine internally. Wikipedia has a good summary here. A popular template engine is smarty if you wanted to try one of the more feature rich ones with its own syntax. I haven't really used smarty very much, so I can't give you any specific information on it. Link to comment https://forums.phpfreaks.com/topic/151573-solved-help-for-someone-new-to-php/#findComment-796108 Share on other sites More sharing options...
redarrow Posted March 29, 2009 Share Posted March 29, 2009 If you have design the footer and header, now create the body's each body can be added via a require() and function's can be called. Link to comment https://forums.phpfreaks.com/topic/151573-solved-help-for-someone-new-to-php/#findComment-796116 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.