Reply LinkBack Thread Tools Search this Thread
Old 02-04-2006, 05:49   #1 (permalink)
Accurate
Accurate
 
Accurate's Avatar
 
Join Date: Feb 2003
Location: UK
Posts: 1,311
Is the right way to lay out a website?

Until now, I have layed out a website as below.

Each page would consist like:

include header

content would go in here

include footer




Now, I've been told that I should have the content as an include aswel? Is this the right way to do things?


Cheers.
__________________
decent web hosting - www.balue.com
.
  Reply With Quote
Old 02-04-2006, 05:51   #2 (permalink)
aspiramedia
Unregistered user
 
aspiramedia's Avatar
 
Join Date: Aug 2005
Posts: 312
This surely depends on your structure.

I wouldn't put your content in an include. What's the point?
  Reply With Quote
Old 02-04-2006, 10:40   #3 (permalink)
Dusteh
Sir digby chicken caesar
 
Dusteh's Avatar
 
Join Date: Sep 2004
Posts: 5,295
I get the feeling you don't mean an include at all... but are talking about building a dynamic website? Afterall, thats what you will end up with if you have an empty template pulling data in for every element. Doing it with includes at this stage would be pointless.
  Reply With Quote
Old 02-04-2006, 10:50   #4 (permalink)
datahound
Spare Parts
 
datahound's Avatar
 
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 5,118
I tend to build a body with top, menu, content and bottom then when I am happy with the design I change only the content to an include. See my current project
http://www.epsweb.co.uk/pearsons/indexcss.php
  Reply With Quote
Old 02-04-2006, 10:52   #5 (permalink)
datahound
Spare Parts
 
datahound's Avatar
 
Join Date: Jan 2005
Location: Bracknell Forest
Posts: 5,118
I would use PHP code like this.

<?php
if(!$page){include("page1.htm");}
elseif($page=="2"){include("page2.htm");}
elseif($page=="3"){include("page3.htm");}
elseif($page=="4"){include("page4.htm");}
else{exit;}
?>

While we are back on the subject of includes would the above be secure against code injection attacks being as it not open ended?
  Reply With Quote
Old 02-04-2006, 12:05   #6 (permalink)
Accurate
Accurate
 
Accurate's Avatar
 
Join Date: Feb 2003
Location: UK
Posts: 1,311
Ok interesting... so thats the right way to do it, but not includes. Ok thanks.
__________________
decent web hosting - www.balue.com
.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8