
04-26-2004, 06:45 PM
|
|
Junior Guru Wannabe
|
|
Join Date: Jul 2003
Location: Memphis
Posts: 30
|
|
Layout Question - Frams - VS - tables
I have a pretty basic web page design question.
I now know some the differences and pros and cons of frames versus tables.
I am now trying to make my web site in tables. It is a pretty basic website with navigation at the top and content in the bottom.
When I had done the website befoer I used frames at the top and botton - which made navigation easy. Now when I am trying to do the same thing in tables, how do I handle the navigation?
Will I just have to have all the same content on every page?
Thanks in advance.
|

04-26-2004, 07:01 PM
|
|
Junior Guru Wannabe
|
|
Join Date: Apr 2004
Posts: 78
|
|
Well you can use magic php to do that. Just create footer.php and header.php and include those with everypage  like this:
PHP Code:
<? include('header.php') ?>
Normal html or php code goes here
<? include('footer.php') ?>
|

04-26-2004, 11:09 PM
|
|
Junior Guru Wannabe
|
|
Join Date: Jul 2003
Location: Memphis
Posts: 30
|
|
What is magic php? - Functions built into PHP?
I have a recent version of PHP on this server.
|

04-26-2004, 11:17 PM
|
|
Temporarily Suspended
|
|
Join Date: May 2002
Posts: 76
|
|
Just PHP, forget about the magic thing.
Create a file called header.php and put the navigation code there.
Create a file called footer.php and put the footer code there.
Create a file called mypage.php and place the following code in it.
PHP Code:
<? include('header.php') ?>
Normal html or php code goes here
<? include('footer.php') ?>
Upload the 3 files and this will do the job. Simple!
|

04-26-2004, 11:33 PM
|
|
Hmmm....
|
|
Join Date: Apr 2003
Location: UK
Posts: 2,341
|
|
Quote:
What is magic php? - Functions built into PHP?
I have a recent version of PHP on this server.
|
 Are you serious?
|

04-26-2004, 11:35 PM
|
|
Hmmm....
|
|
Join Date: Apr 2003
Location: UK
Posts: 2,341
|
|
Anyway, you can use SSI and a virtual include. Save as .shtml or add the extension you wish to use with the below to using Mime Types
<!--#include file='filename.htm'-->
|

04-26-2004, 11:41 PM
|
|
Junior Guru Wannabe
|
|
Join Date: Jul 2003
Location: Memphis
Posts: 30
|
|
how will this effect web spyders as related to keyword indexing?
Do they analyse PHO content, or is it an issue?
|

04-26-2004, 11:56 PM
|
|
Junior Guru Wannabe
|
|
Join Date: Jul 2003
Location: Memphis
Posts: 30
|
|
I have been playing with this nifty new *magic*
And have made a page work - now my question is thing - I see when I look at the source the web page produces, that it is literally combining 2 php pages to return one.
On the spidering issue - this is obviously server side, so my guess it the spiders dont care one way or another. Is this correct?
The one thing I am curious about (remember I am mainly ad admin, so save the flames.)
Is do I need to make sure that what is returned is a valid HTML page? - Because I made the following:
header.php:
<strong>
This is the header <BR>
</strong>
Footer.php:
<strong>
<BR>This is the footer
</strong>
mypage.php:
<? include('header.php') ?>
Normal html or php code goes here
<? include('footer.php') ?>
And it produces the following:
<strong>
This is the header <BR>
</strong>
Normal html or php code goes here
<strong>
<BR>This is the footer <BR>
</strong>
My question is - does it matter that things like </HTML> are not in the page that is generated?
Thanks for the responses.
|

04-27-2004, 12:13 AM
|
|
Temporarily Suspended
|
|
Join Date: May 2002
Posts: 76
|
|
you can make the <html> tags appear...
<html>
<head>
<title>My lovely site</title>
</head>
<body>
<? include('header.php') ?>
Normal html or php code goes here.
<? include('header.php') ?>
</body>
</html>
You can use as many times as you want the include() PHP function, as many times and where you want also. You can include .php and also .html or .txt, etc.
Spiders won't recognize the difference.
|

04-27-2004, 12:42 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Jul 2003
Location: Memphis
Posts: 30
|
|
I guess that makes sense, because they would ignore those tags anyway eh?
Also I guess this could be used as some kind of security mechanism? - If you wanted to hide some stuff eh?
|

04-27-2004, 12:47 AM
|
|
Temporarily Suspended
|
|
Join Date: May 2002
Posts: 76
|
|
No tags are ignored... HTML will be displayed in the same way as if you wrote all straigt fwrd without include()...
Test it on your site to see the results.
|

04-27-2004, 01:07 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Jul 2003
Location: Memphis
Posts: 30
|
|
spiders wouldnt index those tags anyway
I just meant spiders wouldnt index those tags anyway if they werent there. As long as the page renders correctly.
|

04-27-2004, 01:10 AM
|
|
Temporarily Suspended
|
|
Join Date: May 2002
Posts: 76
|
|
Oh... ok, thats true 
|

05-01-2004, 01:08 AM
|
|
Newbie
|
|
Join Date: Apr 2004
Location: Here, most likely not where you are.
Posts: 12
|
|
Quote:
Originally posted by pmoduk2
Are you serious?
|
I had the same reaction!!
|

05-01-2004, 03:11 AM
|
|
Hmmm....
|
|
Join Date: Apr 2003
Location: UK
Posts: 2,341
|
|
Quote:
|
My question is - does it matter that things like </HTML> are not in the page that is generated?
|
Depends, if you want it to completely fail in search engines, follow no rules as to standard HTML 4.01 and so on, then you can leave them out.
I suggest coding your whole page, then certain areas that will be the same on every page, copy the page into a new file, and use an include to include that section.
If your page is made up of tables, make sure you don't miss any tags out. If you want to make an example of explain in full detail just ask and I will 
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|