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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.