Jump to content

Scripting A Website


Hate

Recommended Posts

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,

Link to comment
https://forums.phpfreaks.com/topic/215030-scripting-a-website/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/215030-scripting-a-website/#findComment-1118502
Share on other sites

Search for an open source content management system. Will save you years of work.

 

Years of work?  :o

 

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.  :(

Link to comment
https://forums.phpfreaks.com/topic/215030-scripting-a-website/#findComment-1118594
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.