Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website Design Forum


You are currently viewing our Website Design Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Help To Start A New Site
Old 12-27-2007, 05:12 AM Help To Start A New Site
Rajaie's Avatar
Super Talker

Posts: 128
Trades: 0
First of all, great forum you have here and hopefully someone will be able to answer my question.

I know HTML and some PHP but I'm learning more PHP everyday.
What I'd like to ask is if I want to start a new site and would like all the pages
to have the same design/layout how can I accomplish this ?

I already read about using the include function and to create a separate header and footer and have one file as the template.But this sounds useless because if I wanted to add something new to the body of all the pages then I would have to edit all the pages I made.Could someone tell me how to do it right?

Thanks in advance
Rajaie is offline
Reply With Quote
View Public Profile Visit Rajaie's homepage!
 
 
Register now for full access!
Old 12-27-2007, 06:40 AM Re: Help To Start A New Site
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
I think what you want could be done using Dreamweaver. It lets you create one page that has the layout you want all of your pages to have, then you just apply it to your other pages.

If you make any changes to the template, it will affect all of the pages on your site that are linked to it

Although you would need to get hold of a copy of Dreamweaver aswell as learn how to use it in that case!
__________________

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
Old 12-27-2007, 06:49 AM Re: Help To Start A New Site
Rajaie's Avatar
Super Talker

Posts: 128
Trades: 0
Thanks for reply but I was thinking of a solution that doesn't deal with dreamweaver or any other editor.
Rajaie is offline
Reply With Quote
View Public Profile Visit Rajaie's homepage!
 
Old 12-27-2007, 12:34 PM Re: Help To Start A New Site
Novice Talker

Posts: 8
Name: Jesse
Trades: 0
just use your index.php and just open it in notepad, and put in different content, and save it as whatever.php and link them togeather, this way it all used the same design, just content changes
solemage is offline
Reply With Quote
View Public Profile
 
Old 12-27-2007, 01:31 PM Re: Help To Start A New Site
Rajaie's Avatar
Super Talker

Posts: 128
Trades: 0
thanx man, but I have already found this CMS called joomla and i think it's the best solution
Rajaie is offline
Reply With Quote
View Public Profile Visit Rajaie's homepage!
 
Old 12-27-2007, 02:00 PM Re: Help To Start A New Site
Defies a Status

Posts: 3,420
Trades: 0
Yeh using a CMS like Joomla can certainly help. If you decide you want to do it by hand afterall, you'll simply need do as already stated.

Create pages like header.php and footer.php, then use the PHP include function to make the server construct these when the page is requested. To achieve the same style throughout, the stylesheet could be linked to from header.php.

In each page, simply add:

PHP Code:
<?php include("header.php");?>
at the top, and do the same with the other PHP files you want inserted.

Dan
CSS4Life is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help To Start A New Site
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17016 seconds with 12 queries