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.

PHP Forum


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



Freelance Jobs

Reply
Best Web Design Techniques and Templates
Old 04-16-2009, 11:59 AM Best Web Design Techniques and Templates
Average Talker

Posts: 19
Trades: 0
So ever since I started created webpages, I've been using php includes for all my pages. Something like this.

Code:
<?php include("./header.php"); ?>

<?php include("./menu.php"); ?>

<?php include("./left_panel.php"); ?>

<?php include("./body.php"); ?>

<?php include("./footer.php"); ?>
Is there any better techniques in creating webpages? What's yours? I've tried CMS like drupal but it's very limited and to control some part of my website to how I want it to look is reall hard, even the simplest thing like adding unique icons to blocks, I'd have to create a new block.tpl.php file for every block.

To theme every field or page, I'd have to create a new template. So I just wonder to myself, why not handcode my html's.

Any suggestion on ways to creating webpages?
rogerchin85 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-16-2009, 05:19 PM Re: Best Web Design Techniques and Templates
Novice Talker

Posts: 5
Trades: 0
Use wordpress, I recommend it.
Friendly Fox is offline
Reply With Quote
View Public Profile
 
Old 04-16-2009, 07:42 PM Re: Best Web Design Techniques and Templates
Extreme Talker

Posts: 246
Trades: 0
I use C# with masterpages, basically the same concept. I think that having the areas that are on every (or almost every) page included from a seperate file is best. This way if there is a change to say the menu you end up making one change rather than 100 page (or however many you have for your site)
stbuchok is offline
Reply With Quote
View Public Profile
 
Old 04-16-2009, 10:46 PM Re: Best Web Design Techniques and Templates
NewBreed's Avatar
Extreme Talker

Posts: 223
Name: Johnny
Location: Washington
Trades: 0
I basically have the same technique except I just use 2 includes.

These are combined to open all tags.
<?php include("./header.php"); ?>

<?php include("./menu.php"); ?>

<?php include("./left_panel.php"); ?>

and my footer.php is added last to close everything.
Then my closing html tags.
</body>
</html>
__________________
"The only thing that interferes with my learning is my education." -Albert Einstein
NewBreed is offline
Reply With Quote
View Public Profile
 
Old 04-18-2009, 05:53 AM Re: Best Web Design Techniques and Templates
Jaryth000's Avatar
Skilled Talker

Posts: 59
Name: Jaryth
Location: Canada
Trades: 0
Hmm Im bad. I tend to use includes inside includes.

like, on my main pages, Ill have

<?PHP include("header.php?"); ?>

CONTENT

<?PHP include("footer.php?"): ?>


and inside the header, will have like:

<html>
<head>
(link to external CSS)
(link to external JS)
</head>
<body>
<?PHP include("bannerstuff.php?"); ?>
<?PHP include("topnav.php?"); ?>
<div id="content">


then the footer would have basically the close to the </div> and all the closing stuff (like footers and whatnot).
By using that, I can completely change/re-theme almost my entire site by changing a a file here or there.

<_< though Im sure using Includes inside Includes really isnt good...

Hmm, I wonder when it really starts effecting Proformence?
__________________

Please login or register to view this content. Registration is FREE
My personal website
-Jaryth (UID590)
Jaryth000 is offline
Reply With Quote
View Public Profile Visit Jaryth000's homepage!
 
Reply     « Reply to Best Web Design Techniques and Templates
 

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.66874 seconds with 12 queries