Hate Posted October 3, 2010 Share Posted October 3, 2010 Hi, I'm working on a design for a new website of mine, but I'm kind of stuck on how to fit in the php aspect of it. There's going to be a lot of different pages and different things you're able to do on each page. I guess I'm trying to figure out how to take my design for the website and break it up into a template system. I don't know anything about using templates though. The last time I tried to make a template I just winged it and it turned out really bad with a lot of confusing code slapped together with html all around it. Right now all I have is a single page made (front page) and I want to use this as my base template. Could anyone explain to me the proper way to go about this, or perhaps link me to a tutorial covering this. Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/215030-scripting-a-website/ Share on other sites More sharing options...
laanes Posted October 3, 2010 Share Posted October 3, 2010 Search for an open source content management system. Will save you years of work. Quote Link to comment https://forums.phpfreaks.com/topic/215030-scripting-a-website/#findComment-1118501 Share on other sites More sharing options...
Yesideez Posted October 3, 2010 Share Posted October 3, 2010 I have to admit to not making a template system which the code reads in and adds the relevant HTML but what I do is I make a file called template.html which contains all my HTML as I want it and I have the css file called screen.css and as this file gets built it's the actual file I use for the site. After I've got my HTML file looking nice I split that into smaller files ready to be included like between the <head> and </head> (head.php), title of the site (title.php), menu (menu.php) and footer (footer.php) and anything else I might need like maybe right news/updates panel (news.php) I then code around those files first writing all the class basics and going on from there. Probably not how you meant but that's how I do it. Quote Link to comment https://forums.phpfreaks.com/topic/215030-scripting-a-website/#findComment-1118502 Share on other sites More sharing options...
Hate Posted October 3, 2010 Author Share Posted October 3, 2010 Search for an open source content management system. Will save you years of work. Years of work? I have to admit to not making a template system which the code reads in and adds the relevant HTML but what I do is I make a file called template.html which contains all my HTML as I want it and I have the css file called screen.css and as this file gets built it's the actual file I use for the site. After I've got my HTML file looking nice I split that into smaller files ready to be included like between the <head> and </head> (head.php), title of the site (title.php), menu (menu.php) and footer (footer.php) and anything else I might need like maybe right news/updates panel (news.php) I then code around those files first writing all the class basics and going on from there. Probably not how you meant but that's how I do it. I'm not sure how to go about this at all. I've never actually coded a website before.. I've always made php scripts that I've ran from console. Quote Link to comment https://forums.phpfreaks.com/topic/215030-scripting-a-website/#findComment-1118594 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.